Bahmni Odoo error after database restoration on fresh installation

I backed up a database from the old server with Bahmni0.92 and restored it on a fresh installation of bahmni 0.92. Since then, I cannot access some link on Odoo Dashboard.

Example. Point of Sales . I get this error:

Traceback (most recent call last):

  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py”, line 642, in _handle_exception*
  • return super(JsonRequest, self)._handle_exception(exception)*
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py”, line 684, in dispatch*
  • result = self._call_function(*self.params)
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py”, line 334, in _call_function*
  • return checked_call(self.db, *args, *kwargs)
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/service/model.py”, line 101, in wrapper*
  • return f(dbname, *args, *kwargs)
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py”, line 327, in checked_call*
  • result = self.endpoint(*a, *kw)
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py”, line 942, in call*
  • return self.method(*args, *kw)
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py”, line 507, in response_wrap*
  • response = f(*args, *kw)
  • File “/opt/bahmni-erp/odoo/addons/web/controllers/main.py”, line 895, in call_kw*
  • return self._call_kw(model, method, args, kwargs)*
  • File “/opt/bahmni-erp/odoo/addons/web/controllers/main.py”, line 887, in _call_kw*
  • return call_kw(request.env[model], method, args, kwargs)*
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/api.py”, line 687, in call_kw*
  • return call_kw_model(method, model, args, kwargs)*
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/api.py”, line 672, in call_kw_model*
  • result = method(recs, *args, *kwargs)
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/models.py”, line 1338, in load_views*
  • for [v_id, v_type] in views*
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/models.py”, line 1338, in *
  • for [v_id, v_type] in views*
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/models.py”, line 1417, in fields_view_get*
  • xarch, xfields = View.postprocess_and_fields(self._name, etree.fromstring(result[‘arch’]), view_id)*
  • File “/opt/bahmni-erp/odoo/addons/base/ir/ir_ui_view.py”, line 919, in postprocess_and_fields*
  • self.raise_view_error(message, view_id)*
  • File “/opt/bahmni-erp/odoo/addons/base/ir/ir_ui_view.py”, line 477, in raise_view_error*
  • raise ValueError(message)* ValueError: Field iface_order_mgmt does not exist

Error context: View pos.config.form.view [view_id: 798, xml_id: point_of_sale.view_pos_config_form, model: pos.config, parent_id: n/a]

and also this error while accessing Sales Order menu:

Traceback (most recent call last):

  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py”, line 642, in _handle_exception*
  • return super(JsonRequest, self)._handle_exception(exception)*
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py”, line 684, in dispatch*
  • result = self._call_function(*self.params)
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py”, line 334, in _call_function*
  • return checked_call(self.db, *args, *kwargs)
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/service/model.py”, line 101, in wrapper*
  • return f(dbname, *args, *kwargs)
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py”, line 327, in checked_call*
  • result = self.endpoint(*a, *kw)
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py”, line 942, in call*
  • return self.method(*args, *kw)
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py”, line 507, in response_wrap*
  • response = f(*args, *kw)
  • File “/opt/bahmni-erp/odoo/addons/web/controllers/main.py”, line 895, in call_kw*
  • return self._call_kw(model, method, args, kwargs)*
  • File “/opt/bahmni-erp/odoo/addons/web/controllers/main.py”, line 887, in _call_kw*
  • return call_kw(request.env[model], method, args, kwargs)*
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/api.py”, line 687, in call_kw*
  • return call_kw_model(method, model, args, kwargs)*
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/api.py”, line 672, in call_kw_model*
  • result = method(recs, *args, *kwargs)
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/models.py”, line 1338, in load_views*
  • for [v_id, v_type] in views*
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/models.py”, line 1338, in *
  • for [v_id, v_type] in views*
  • File “/opt/bahmni-erp/bahmni-addons/bahmni_sale/models/sale_order.py”, line 138, in fields_view_get*
  • result = super(SaleOrder, self).fields_view_get(view_id, view_type, toolbar=toolbar, submenu=submenu)*
  • File “/opt/bahmni-erp/odoo/addons/mail/models/mail_thread.py”, line 364, in fields_view_get*
  • res = super(MailThread, self).fields_view_get(view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu)*
  • File “/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/models.py”, line 1417, in fields_view_get*
  • xarch, xfields = View.postprocess_and_fields(self._name, etree.fromstring(result[‘arch’]), view_id)*
  • File “/opt/bahmni-erp/odoo/addons/base/ir/ir_ui_view.py”, line 890, in postprocess_and_fields*
  • fields_def = self.postprocess(model, node, view_id, False, fields)*
  • File “/opt/bahmni-erp/odoo/addons/base/ir/ir_ui_view.py”, line 795, in postprocess*
  • fields.update(self.postprocess(model, f, view_id, in_tree_view, model_fields))*
  • File “/opt/bahmni-erp/odoo/addons/base/ir/ir_ui_view.py”, line 795, in postprocess*
  • fields.update(self.postprocess(model, f, view_id, in_tree_view, model_fields))*
  • File “/opt/bahmni-erp/odoo/addons/base/ir/ir_ui_view.py”, line 795, in postprocess*
  • fields.update(self.postprocess(model, f, view_id, in_tree_view, model_fields))*
  • File “/opt/bahmni-erp/odoo/addons/base/ir/ir_ui_view.py”, line 795, in postprocess*
  • fields.update(self.postprocess(model, f, view_id, in_tree_view, model_fields))*
  • File “/opt/bahmni-erp/odoo/addons/base/ir/ir_ui_view.py”, line 758, in postprocess*
  • xarch, xfields = self.with_context(base_model_name=model).postprocess_and_fields(field.comodel_name, f, view_id)*
  • File “/opt/bahmni-erp/odoo/addons/base/ir/ir_ui_view.py”, line 919, in postprocess_and_fields*
  • self.raise_view_error(message, view_id)*
  • File “/opt/bahmni-erp/odoo/addons/base/ir/ir_ui_view.py”, line 477, in raise_view_error*
  • raise ValueError(message)* ValueError: Field sell_rental_id does not exist

Error context: View sale.order.form [view_id: 538, xml_id: sale.view_order_form, model: sale.order, parent_id: n/a]

There are too many broken links

@gabykant Oh sorry! Kindly pastebin makes error logs sharing easy and I believe you will like it.

Hi @jwnasambu

Thanks. Here is the link Error context:View `pos.config.form.view`[view_id: 798, xml_id: point_of_sal - Pastebin.com

Please confirm you have done the “one time steps for Odoo”. https://bahmni.atlassian.net/wiki/spaces/BAH/pages/3117482082/Odoo+Configurations#One-time-Setup-for-Odoo

Even though you are not using docker version of Bahmni, the above steps will likely be needed to ensure your new Odoo is correctly setup.

Alternatively, try and setup Bahmni Docker with Odoo, and replace your DB here in docker, and see if Odoo starts up fine within Docker. You can compare the two maybe.

I dit it and same error occurs. I’m deleting the database and will restore it back again. I’ll let you know

Is it normal that during the restoration I’m having this error ? Model has no table

Yes. These kind of errors come when Odoo starts up, and notices the tables missing. When a module is installed, it auto generates the missing tables, on inspecting the database. Only way to know things are working fine, are by accessing the relevant Odoo screens. Make sure you have performed the one time steps mentioned above, and check if the Bahmni modules are installed.

https://bahmni.atlassian.net/wiki/spaces/BAH/pages/900530355/ERP+FAQs+Troubleshooting

try upgrading bahmni account module in odoo apps

I have done it but the same error still occurs when I click on Point of Sales. I reinstalled Bahmni so many Times and nothing has changed. Same error.

But if I uninstall and reinstall the Bahmni_account and Bahmni_sale then the problem is solved but the data have been deleted. Is there no Bahmni command to repair this ? The problem seem to be in the stored data