openspp-modules icon indicating copy to clipboard operation
openspp-modules copied to clipboard

Unable to view Registry records in QA instances

Open anthonymarkQA opened this issue 10 months ago • 3 comments

Describe the bug An odoo error appears when opening records in registry be it viewing an existing registry or creating a new one.

To Reproduce Context: the QA instance has its image updated but no DB reset was made. this issue is reproducible only if the DB has not been reset during image update.

  1. Login as admin into QA SPMIS or QA Farmer instances
  2. Go to registry
  3. Select either group or individual then click on any record to view. Notice an odoo error appears.
  4. Attempt to create a record by clicking NEW button. Notice an odoo error appears.

Error log RPC_ERROR Odoo Server Error Traceback (most recent call last): File "/opt/odoo/odoo/http.py", line 1788, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) File "/opt/odoo/odoo/service/model.py", line 133, in retrying result = func() File "/opt/odoo/odoo/http.py", line 1816, in _serve_ir_http response = self.dispatcher.dispatch(rule.endpoint, args) File "/opt/odoo/odoo/http.py", line 2020, in dispatch result = self.request.registry['ir.http']._dispatch(endpoint) File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 221, in _dispatch result = endpoint(**request.params) File "/opt/odoo/odoo/http.py", line 757, in route_wrapper result = endpoint(self, *args, **params_ok) File "/opt/odoo/addons/web/controllers/dataset.py", line 28, in call_button action = self._call_kw(model, method, args, kwargs) File "/opt/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/opt/odoo/odoo/api.py", line 468, in call_kw result = _call_kw_multi(method, model, args, kwargs) File "/opt/odoo/odoo/api.py", line 453, in _call_kw_multi result = method(recs, *args, **kwargs) File "", line 2, in button_immediate_upgrade File "/opt/odoo/odoo/addons/base/models/ir_module.py", line 75, in check_and_log return method(self, *args, **kwargs) File "/opt/odoo/odoo/addons/base/models/ir_module.py", line 660, in button_immediate_upgrade return self._button_immediate_function(self.env.registry[self._name].button_upgrade) File "/opt/odoo/odoo/addons/base/models/ir_module.py", line 593, in _button_immediate_function registry = modules.registry.Registry.new(self._cr.dbname, update_module=True) File "", line 2, in new File "/opt/odoo/odoo/tools/func.py", line 87, in locked return func(inst, *args, **kwargs) File "/opt/odoo/odoo/modules/registry.py", line 110, in new odoo.modules.load_modules(registry, force_demo, status, update_module) File "/opt/odoo/odoo/modules/loading.py", line 477, in load_modules processed_modules += load_marked_modules(env, graph, File "/opt/odoo/odoo/modules/loading.py", line 365, in load_marked_modules loaded, processed = load_module_graph( File "/opt/odoo/odoo/modules/loading.py", line 206, in load_module_graph registry.init_models(env.cr, model_names, {'module': package.name}, new_install) File "/opt/odoo/odoo/modules/registry.py", line 569, in init_models model._auto_init() File "/opt/odoo/odoo/models.py", line 3175, in _auto_init new = field.update_db(self, columns) File "/opt/odoo/odoo/fields.py", line 3048, in update_db return super(Many2one, self).update_db(model, columns) File "/opt/odoo/odoo/fields.py", line 1005, in update_db self.update_db_column(model, column) File "/opt/odoo/odoo/fields.py", line 3051, in update_db_column super(Many2one, self).update_db_column(model, column) File "/opt/odoo/odoo/fields.py", line 1041, in update_db_column self._convert_db_column(model, column) File "/opt/odoo/odoo/fields.py", line 1045, in _convert_db_column sql.convert_column(model._cr, model._table, self.name, self.column_type[1]) File "/opt/odoo/odoo/tools/sql.py", line 311, in convert_column _convert_column(cr, tablename, columnname, columntype, using) File "/opt/odoo/odoo/tools/sql.py", line 335, in _convert_column cr.execute(query, log_exceptions=False) File "/opt/odoo/odoo/sql_db.py", line 332, in execute res = self._obj.execute(query, params) psycopg2.errors.InvalidTextRepresentation: invalid input syntax for type integer: "Lgbt"

The above server error caused the following client error: RPC_ERROR: Odoo Server Error RPC_ERROR at makeErrorFromResponse (https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:2929:163) at XMLHttpRequest. (https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:2933:13)

Expected behavior Should be able to create record from either group or individual when updating the instance. Should be able to view record either from group or individual when updating the instance. Screenshots

Image

Additional context

🔔 Note: This ticket should address common considerations without including country-specific content. Please ensure all references are generic and applicable across various contexts.

anthonymarkQA avatar Feb 27 '25 07:02 anthonymarkQA

PR: https://github.com/OpenSPP/openg2p-registry/pull/5

reichie020212 avatar Feb 27 '25 08:02 reichie020212

This is ready to be re-tested in the instances mentioned above as the fix in OpenSPP/openg2p-registry was merged on March 10, 2025.

kneckinator avatar May 14 '25 03:05 kneckinator

Hi @kneckinator , i tested in QA SPMIS and it seems ok, however it still is not working for QA farmer registry generic, it is displaying a different error instead.

Creating or viewing a group or individual produces the error below:

UncaughtPromiseError > OwlError Uncaught Promise > An error occured in the owl lifecycle (see this Error's "cause" property) OwlError: An error occured in the owl lifecycle (see this Error's "cause" property) Error: An error occured in the owl lifecycle (see this Error's "cause" property) at handleError (https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:925:101) at App.handleError (https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:1576:29) at ComponentNode.initiateRender (https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:1017:19)

Caused by: Error: "res.partner"."marital_status" field is undefined. at Field.parseFieldNode (https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:7751:231) at https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:8639:865 at visit (https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:4286:51) at visitChildren (https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:4285:171) at visit (https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:4286:129) at visitChildren (https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:4285:171) at visit (https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:4286:129) at visitChildren (https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:4285:171) at visit (https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:4286:129) at visitChildren (https://qa-farmer.newlogic.net/web/assets/9557ced/web.assets_web.min.js:4285:171)

anthonymarkQA avatar May 14 '25 06:05 anthonymarkQA

Context: the QA instance has its image updated but no DB reset was made. this issue is reproducible only if the DB has not been reset during image update.

Could it be that no DB migration was taking place as part of the upgrade?

kneckinator avatar Jun 16 '25 03:06 kneckinator

This is now working in QA farmer,

Image

However issue is still persistent in QA SPMIS. @kneckinator if i understand you correctly, when updating an image of an instance, DB migration ideally automatically occurs, preserving data of the instance.

but i think thats is not whats happening currently. DB has to be reset manually by devops/devs when image is updated. maybe we can ask @emjay0921 for more information on this.

anthonymarkQA avatar Jun 17 '25 00:06 anthonymarkQA

Given the above discussion, I attribute this issue to an issue with our QA deployment scripts and not with OpenSPP (the product) itself. Thus, I will close this issue without further action.

kneckinator avatar Aug 13 '25 05:08 kneckinator