Yenthe666 / auto_backup

Automated database backups from Odoo, both locally and on an FTP server
MIT License
251 stars 281 forks source link

Error when I try to install auto_backup #106

Closed etiennebonnafoux closed 5 years ago

etiennebonnafoux commented 6 years ago

Hi,

I got this trying to install your module, I already check I have all the requirement.

Traceback (most recent call last):
  File "/opt/odoo/odoo11/odoo/http.py", line 651, in _handle_exception
    try:
  File "/opt/odoo/odoo11/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/opt/odoo/odoo11/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/opt/odoo/odoo11/odoo/http.py", line 693, in dispatch
  File "/opt/odoo/odoo11/odoo/http.py", line 342, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo11/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo11/odoo/http.py", line 335, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/odoo11/odoo/http.py", line 937, in __call__
    def __call__(self, *args, **kw):
  File "/opt/odoo/odoo11/odoo/http.py", line 516, in response_wrap
    def response_wrap(*args, **kw):
  File "/opt/odoo/odoo11/addons/web/controllers/main.py", line 935, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo/odoo11/addons/web/controllers/main.py", line 923, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo11/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/odoo11/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "<decorator-gen-41>", line 2, in button_immediate_install
  File "/opt/odoo/odoo11/odoo/addons/base/module/module.py", line 71, in check_and_log
    return method(self, *args, **kwargs)
  File "/opt/odoo/odoo11/odoo/addons/base/module/module.py", line 448, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/opt/odoo/odoo11/odoo/addons/base/module/module.py", line 541, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/opt/odoo/odoo11/odoo/modules/registry.py", line 85, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/opt/odoo/odoo11/odoo/modules/loading.py", line 380, in load_modules
    loaded_modules, update_module, models_to_check)
  File "/opt/odoo/odoo11/odoo/modules/loading.py", line 274, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/opt/odoo/odoo11/odoo/modules/loading.py", line 181, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/opt/odoo/odoo11/odoo/modules/loading.py", line 95, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/opt/odoo/odoo11/odoo/tools/convert.py", line 785, in convert_file
    convert_csv_import(cr, module, pathname, fp.read(), idref, mode, noupdate)
  File "/opt/odoo/odoo11/odoo/tools/convert.py", line 832, in convert_csv_import
    raise Exception(_('Module loading %s failed: file %s could not be processed:\n %s') % (module, fname, warning_msg))
Exception: Module loading auto_backup failed: file auto_backup/security/ir.model.access.csv could not be processed:
 No matching record found for external id 'model_db_backup' in field 'Object'
Missing required value for the field 'Object' (model_id)
No matching record found for external id 'model_db_backup' in field 'Object'
Missing required value for the field 'Object' (model_id)
mcgumbel commented 6 years ago

I get the same error. Any suggestions?

etiennebonnafoux commented 6 years ago

With no answer how to debug it, I used this script https://linuxize.com/post/how-to-setup-automatic-odoo-backup/ .It work well for now. Only problem I tried with no sucess to put the file in Google Drive following this API but it didn't work. https://tech.rgou.net/en/linux-2/backup-script-on-google-drive-for-linux/ If you find how to do it please let me know.

mcgumbel commented 6 years ago

@etiennebonnafoux : thanks for the link. I had tried this yesterday, but it didn't work. The *.zip file generated by odoo was always corrupt. Miraculously it started working today.

Yenthe666 commented 6 years ago

This is the true cultprit: Exception: Module loading auto_backup failed: file auto_backup/security/ir.model.access.csv could not be processed I don't see any issue or typo in there though. What happens when you run it with -u auto_backup in the terminal?

asiamatrix commented 5 years ago

Any solution?

Yenthe666 commented 5 years ago

Never gotten any feedback from anyone on this question: I don't see any issue or typo in there though. What happens when you run it with -u auto_backup in the terminal?

asiamatrix commented 5 years ago

I try in local work fine but in server throw some error. How can I solve it?

Yenthe666 commented 5 years ago

Try these:

AhmedMohamedEid commented 5 years ago

I have the Same Error!

tonisanth commented 5 years ago

Same Error..

File "/opt/odoo/odoo11/odoo/tools/convert.py", line 832, in convert_csvimport raise Exception(('Module loading %s failed: file %s could not be processed:\n %s') % (module, fname, warning_msg)) Exception: Module loading auto_backup failed: file auto_backup/security/ir.model.access.csv could not be processed: No matching record found for external id 'model_db_backup' in field 'Object' Missing required value for the field 'Object' (model_id) No matching record found for external id 'model_db_backup' in field 'Object' Missing required value for the field 'Object' (model_id)

fullstackdevsalmoh commented 5 years ago

I had same error but I restarted the service and it works. but I can see the port is 8069 what if I have nginx and self signed SSL ?

HardGITer commented 5 years ago

This error will appear if your module has no model you using in csv. Try to paste module name before model_name. like product.model_product_product

Yenthe666 commented 5 years ago

Hmm are you sure that is the issue and that your example solves it @HardGITer? I've never seen this before I believe.

usmanfarzandali commented 4 years ago

i get the same error any suggestion pls for v11