Skip to Content
Menu
This question has been flagged
2 Replies
1937 Views

I accidentally deleted a payment method and cannot see it in the congifuration list of providers. I tried to upgrade the app from the apps page so it can be restored, but receive this error:

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 698, in _tag_root
f(rec)
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 533, in _tag_record
raise Exception("Cannot update missing record %r" % xid)
Exception: Cannot update missing record 'payment.payment_provider_flutterwave'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/odoo/src/odoo/16.0/odoo/http.py", line 1584, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/home/odoo/src/odoo/16.0/odoo/service/model.py", line 134, in retrying
result = func()
File "/home/odoo/src/odoo/16.0/odoo/http.py", line 1611, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/home/odoo/src/odoo/16.0/odoo/http.py", line 1808, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/home/odoo/src/odoo/16.0/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/home/odoo/src/odoo/16.0/odoo/addons/base/models/ir_http.py", line 149, in _dispatch
result = endpoint(**request.params)
File "/home/odoo/src/odoo/16.0/odoo/http.py", line 699, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/home/odoo/src/odoo/16.0/addons/web/controllers/dataset.py", line 46, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/odoo/src/odoo/16.0/addons/web/controllers/dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/src/odoo/16.0/odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/src/odoo/16.0/odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_upgrade
File "/home/odoo/src/odoo/16.0/odoo/addons/base/models/ir_module.py", line 76, in check_and_log
return method(self, *args, **kwargs)
File "/home/odoo/src/odoo/16.0/odoo/addons/base/models/ir_module.py", line 678, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/home/odoo/src/custom/trial/saas_trial/models/module.py", line 52, in _button_immediate_function
res = super(IrModuleModule, self)._button_immediate_function(function)
File "/home/odoo/src/odoo/16.0/odoo/addons/base/models/ir_module.py", line 615, in _button_immediate_function
registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "", line 2, in new
File "/home/odoo/src/odoo/16.0/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/16.0/odoo/modules/registry.py", line 90, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/16.0/odoo/modules/loading.py", line 483, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/home/odoo/src/odoo/16.0/odoo/modules/loading.py", line 371, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/odoo/src/odoo/16.0/odoo/modules/loading.py", line 230, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/home/odoo/src/odoo/16.0/odoo/modules/loading.py", line 71, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 763, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 829, in convert_xml_import
obj.parse(doc.getroot())
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 749, in parse
self._tag_root(de)
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 711, in _tag_root
raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing /home/odoo/src/odoo/16.0/addons/payment_flutterwave/data/payment_provider_data.xml:4, somewhere inside

flutterwave

True


The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
at makeErrorFromResponse (https://moore1-test.odoo.com/web/assets/1171-eb21e88/web.assets_backend.min.js:974:163)
at XMLHttpRequest. (https://moore1-test.odoo.com/web/assets/1171-eb21e88/web.assets_backend.min.js:982:13)


Avatar
Discard

Hi,

try to upgrade Payment module.

Best Answer

Hi  amani ,

You are getting this error because you have deleted an existing record within the payment module ( flutterwave )

  1. upgrade "Payment Engine" module 
  2. uninstall flutterwave payment provider module and install it again

since you have used this payment provider you can't uninstall it.
so, you need to add this record in custom module

<odoo>
    <record id="payment.payment_provider_flutterwave" model="payment.provider">
        <field name="code">flutterwave</field>
        <field name="redirect_form_view_id" ref="redirect_form"/>
        <field name="allow_tokenization">True</field>
    </record>

</odoo>


Hope to help :)

Avatar
Discard
Author

Hey Sahar,

Thanks for the response.

I have tried to upgrade "payment engine" module. and receive the following error:
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/src/odoo/16.0/odoo/http.py", line 1584, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/home/odoo/src/odoo/16.0/odoo/service/model.py", line 134, in retrying
result = func()
File "/home/odoo/src/odoo/16.0/odoo/http.py", line 1611, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/home/odoo/src/odoo/16.0/odoo/http.py", line 1808, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/home/odoo/src/odoo/16.0/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/home/odoo/src/odoo/16.0/odoo/addons/base/models/ir_http.py", line 149, in _dispatch
result = endpoint(**request.params)
File "/home/odoo/src/odoo/16.0/odoo/http.py", line 699, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/home/odoo/src/odoo/16.0/addons/web/controllers/dataset.py", line 46, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/odoo/src/odoo/16.0/addons/web/controllers/dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/src/odoo/16.0/odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/src/odoo/16.0/odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-80>", line 2, in button_immediate_upgrade
File "/home/odoo/src/odoo/16.0/odoo/addons/base/models/ir_module.py", line 76, in check_and_log
return method(self, *args, **kwargs)
File "/home/odoo/src/odoo/16.0/odoo/addons/base/models/ir_module.py", line 678, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/home/odoo/src/custom/trial/saas_trial/models/module.py", line 52, in _button_immediate_function
res = super(IrModuleModule, self)._button_immediate_function(function)
File "/home/odoo/src/odoo/16.0/odoo/addons/base/models/ir_module.py", line 615, in _button_immediate_function
registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "<decorator-gen-14>", line 2, in new
File "/home/odoo/src/odoo/16.0/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/16.0/odoo/modules/registry.py", line 90, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/16.0/odoo/modules/loading.py", line 483, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/home/odoo/src/odoo/16.0/odoo/modules/loading.py", line 371, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/odoo/src/odoo/16.0/odoo/modules/loading.py", line 230, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/home/odoo/src/odoo/16.0/odoo/modules/loading.py", line 71, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 763, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 829, in convert_xml_import
obj.parse(doc.getroot())
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 749, in parse
self._tag_root(de)
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 709, in _tag_root
raise ParseError(msg) from None # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback
odoo.tools.convert.ParseError: while parsing /home/odoo/src/odoo/16.0/addons/website_sale/views/res_config_settings_views.xml:4
Error while validating view:

Element '<div id="website_payment_right_pane">' cannot be located in parent view

View error context:
{'file': '/home/odoo/src/odoo/16.0/addons/website_sale/views/res_config_settings_views.xml',
'line': 1,
'name': 'res.config.settings.view.form.inherit.website.payment.paypal',
'view': ir.ui.view(2468,),
'view.model': 'res.config.settings',
'view.parent': ir.ui.view(2137,),
'xmlid': 'res_config_settings_view_form_web_terms'}

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
at makeErrorFromResponse (https://mooretest.odoo.com/web/assets/1171-eb21e88/web.assets_backend.min.js:974:163)
at XMLHttpRequest.<anonymous> (https://mooretest.odoo.com/web/assets/1171-eb21e88/web.assets_backend.min.js:982:13)

Author

Hi again Sahar,

So i have finally been able to upgrade "payment_module_flutterwave" and it's restored back on my list of providers. However, it now appears without a technical code set (No provider set) and this field is uneditable (grey) meaning i cannot add our credentials for the account. For this reason it also crashes when i attempt a test transcation on the website. Please advise.

Upgrading Flutterwave payment provider won't solve the problem.
Try uninstall flutterwave module and install it again

Author

Hey Sahar,

Thanks for the reply. I have tried to unistall the module but keep getting the following error.

Validation Error

The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead.

Model: Payment Methods (account.payment.method.line)
Constraint: account_payment_method_line_payment_method_id_fkey

I updated the answer, Please check it

Author

Hello Sahar,

Thanks again! Where can i place this custom module? Also I used the payment provider for tests, is there no way of removing the test records to uninstall? If not, please provide some more information regarding the steps to place the custom module.

Author

Hello again, so i tested it in the architecture under edit view:form under the developer menu top right of the screen. I saw a drap down box with the different codes, when i try to select flutterwave it applies but as soon as i save it resets to not provided...

Best Answer

Just for having some context: from where and how did you delete the payment method?


Avatar
Discard
Author

Hey Sergi,

For context it was deleted from the payment methods under configuration on settings page. I have treid to upgrade the module but get the error;
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 698, in _tag_root
f(rec)
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 533, in _tag_record
raise Exception("Cannot update missing record %r" % xid)
Exception: Cannot update missing record 'payment.payment_provider_flutterwave'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/odoo/src/odoo/16.0/odoo/http.py", line 1584, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/home/odoo/src/odoo/16.0/odoo/service/model.py", line 134, in retrying
result = func()
File "/home/odoo/src/odoo/16.0/odoo/http.py", line 1611, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/home/odoo/src/odoo/16.0/odoo/http.py", line 1808, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/home/odoo/src/odoo/16.0/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/home/odoo/src/odoo/16.0/odoo/addons/base/models/ir_http.py", line 149, in _dispatch
result = endpoint(**request.params)
File "/home/odoo/src/odoo/16.0/odoo/http.py", line 699, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/home/odoo/src/odoo/16.0/addons/web/controllers/dataset.py", line 46, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/odoo/src/odoo/16.0/addons/web/controllers/dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/src/odoo/16.0/odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/src/odoo/16.0/odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-80>", line 2, in button_immediate_upgrade
File "/home/odoo/src/odoo/16.0/odoo/addons/base/models/ir_module.py", line 76, in check_and_log
return method(self, *args, **kwargs)
File "/home/odoo/src/odoo/16.0/odoo/addons/base/models/ir_module.py", line 678, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/home/odoo/src/custom/trial/saas_trial/models/module.py", line 52, in _button_immediate_function
res = super(IrModuleModule, self)._button_immediate_function(function)
File "/home/odoo/src/odoo/16.0/odoo/addons/base/models/ir_module.py", line 615, in _button_immediate_function
registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "<decorator-gen-14>", line 2, in new
File "/home/odoo/src/odoo/16.0/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/16.0/odoo/modules/registry.py", line 90, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/16.0/odoo/modules/loading.py", line 483, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/home/odoo/src/odoo/16.0/odoo/modules/loading.py", line 371, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/odoo/src/odoo/16.0/odoo/modules/loading.py", line 230, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/home/odoo/src/odoo/16.0/odoo/modules/loading.py", line 71, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 763, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 829, in convert_xml_import
obj.parse(doc.getroot())
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 749, in parse
self._tag_root(de)
File "/home/odoo/src/odoo/16.0/odoo/tools/convert.py", line 711, in _tag_root
raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing /home/odoo/src/odoo/16.0/addons/payment_flutterwave/data/payment_provider_data.xml:4, somewhere inside
<record id="payment.payment_provider_flutterwave" model="payment.provider">
<field name="code">flutterwave</field>
<field name="redirect_form_view_id" ref="redirect_form"/>
<field name="allow_tokenization">True</field>
</record>

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
at makeErrorFromResponse (https://mooredistributors.odoo.com/web/assets/1171-eb21e88/web.assets_backend.min.js:974:163)
at XMLHttpRequest.<anonymous> (https://mooredistributors.odoo.com/web/assets/1171-eb21e88/web.assets_backend.min.js:982:13)