OCA / odoorpc

Python module to pilot your Odoo servers through JSON-RPC.
http://pythonhosted.org/OdooRPC/
GNU Lesser General Public License v3.0
231 stars 123 forks source link

Odoo 13 Database Restore #58

Closed heshammostafa07 closed 3 years ago

heshammostafa07 commented 3 years ago

I am trying to restore odoo 13 db backup using odoorpc I am using python 3.9 My code as: import odoorpc

odoo = odoorpc.ODOO('localhost', port=8000) timeout_backup = odoo.config['timeout'] odoo.config['timeout'] = 7200 # Timeout set to 2 hours odoo.db.restore('admin123', 'odooh5', 'dump.zip') odoo.config['timeout'] = timeout_backup

I got the below error

Traceback (most recent call last): File "c:\docker_python\restore.py", line 6, in odoo.db.restore('admin123', 'odooh5', 'dump.zip') File "C:\Users\hesha\AppData\Local\Programs\Python\Python39\lib\site-packages\odoorpc\db.py", line 308, in restore if dump.closed: AttributeError: 'str' object has no attribute 'closed'

pedrobaeza commented 3 years ago

Sorry, but the error you are mentioning corresponds to a custom module or code, so the problem should be there. This issue tracker is for notifying problems with standard Odoo code, and thus I'm closing this.

Try to share your question, doubt or problem in the official Odoo forums (https://www.odoo.com/forum/help-1) or on the mailing lists (https://www.odoo.com/groups) to see if someone can help you.

If you still feel that the problem is due to Odoo, please provide detailed information for reproducing the problem on an standard Odoo (without extra addons) and any possible tip about what's going on.