Dear,
After migrating from odoo v15.0 to v16.0 I have this error message :
at https://xxx.be/web/assets/7295-7b30a93/web.assets_backend.min.js:6805:258
at https://xxx.be/web/assets/7295-7b30a93/web.assets_backend.min.js:6800:242
at https://xxx.be/web/assets/7295-7b30a93/web.assets_backend.min.js:5797:447
The field manual_reinvoice_done is NOT in standard Odoo 15.0 or 16.0.
It comes from the OCA community module https://github.com/OCA/hr expense/tree/15.0/sale_expense_manual_reinvoice, which exists in 15.0 only and was NOT in 16.0.
Your error: OpenUpgrade migrated your database but left orphaned field references because the OCA module doesn't exist for v16.0.
Solution: Either:
1. Remove the field from views using the SQL query (check it executed with UPDATE X response)
2. Or port the OCA module to 16.0 if you need the functionality
Fix Error: Duplicate act_window_view records in account_bank_statement_advanced module.
Solution - Run in PostgreSQL:
DELETE FROM ir_act_window_view WHERE act_window_id = 239 AND view_mode = 'form'
AND id > (SELECT MIN(id) FROM ir_act_window_view WHERE act_window_id = 239 AND view_mode = 'form');
Dear
We progress, again another duplicate keys on noviat module when migration.
Nov 23 16:48:13 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:INFO:odoo.modules.loading:Loading module l10n_be_partner_bank (142/171)
Nov 23 16:48:13 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:INFO:odoo.modules.migration:module l10n_be_partner_bank: Running migration [>16.0.1] pre-migration
Nov 23 16:48:14 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:INFO:OpenUpgrade:l10n_be_partner_bank: pre-migration script called with version 15.0.1.0.0
Nov 23 16:48:14 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:DEBUG:OpenUpgrade:1 rows affected after 0:00:00.001536 running INSERT INTO ir_model_data (create_uid,create_date,write_uid,write_date,noupdate,name,module,model,res_id) VALUES (1,(now() at time zone 'UTC'),1,(now() at time zone 'UTC'),true,'res_bank_BPOTBEB1','l10n_be_partner_bank','res.bank',2)
Nov 23 16:48:14 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:DEBUG:OpenUpgrade:1 rows affected after 0:00:00.001248 running INSERT INTO ir_model_data (create_uid,create_date,write_uid,write_date,noupdate,name,module,model,res_id) VALUES (1,(now() at time zone 'UTC'),1,(now() at time zone 'UTC'),true,'res_bank_GEBABEBB','l10n_be_partner_bank','res.bank',3)
Nov 23 16:48:14 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:DEBUG:OpenUpgrade:1 rows affected after 0:00:00.001094 running INSERT INTO ir_model_data (create_uid,create_date,write_uid,write_date,noupdate,name,module,model,res_id) VALUES (1,(now() at time zone 'UTC'),1,(now() at time zone 'UTC'),true,'res_bank_GKCCBEBB','l10n_be_partner_bank','res.bank',65)
Nov 23 16:48:14 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:DEBUG:OpenUpgrade:1 rows affected after 0:00:00.001143 running INSERT INTO ir_model_data (create_uid,create_date,write_uid,write_date,noupdate,name,module,model,res_id) VALUES (1,(now() at time zone 'UTC'),1,(now() at time zone 'UTC'),true,'res_bank_BBRUBEBB','l10n_be_partner_bank','res.bank',254)
Nov 23 16:48:14 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:DEBUG:OpenUpgrade:1 rows affected after 0:00:00.001129 running INSERT INTO ir_model_data (create_uid,create_date,write_uid,write_date,noupdate,name,module,model,res_id) VALUES (1,(now() at time zone 'UTC'),1,(now() at time zone 'UTC'),true,'res_bank_KREDBEBB','l10n_be_partner_bank','res.bank',349)
Nov 23 16:48:14 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:DEBUG:OpenUpgrade:1 rows affected after 0:00:00.001079 running INSERT INTO ir_model_data (create_uid,create_date,write_uid,write_date,noupdate,name,module,model,res_id) VALUES (1,(now() at time zone 'UTC'),1,(now() at time zone 'UTC'),true,'res_bank_PCHQBEBB','l10n_be_partner_bank','res.bank',553)
Nov 23 16:48:14 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:DEBUG:OpenUpgrade:1 rows affected after 0:00:00.000743 running INSERT INTO ir_model_data (create_uid,create_date,write_uid,write_date,noupdate,name,module,model,res_id) VALUES (1,(now() at time zone 'UTC'),1,(now() at time zone 'UTC'),true,'res_bank_AXABBE22','l10n_be_partner_bank','res.bank',565)
Nov 23 16:48:14 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:DEBUG:OpenUpgrade:1 rows affected after 0:00:00.001114 running INSERT INTO ir_model_data (create_uid,create_date,write_uid,write_date,noupdate,name,module,model,res_id) VALUES (1,(now() at time zone 'UTC'),1,(now() at time zone 'UTC'),true,'res_bank_RABOBE22','l10n_be_partner_bank','res.bank',690)
Nov 23 16:48:14 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:DEBUG:OpenUpgrade:1 rows affected after 0:00:00.000854 running INSERT INTO ir_model_data (create_uid,create_date,write_uid,write_date,noupdate,name,module,model,res_id) VALUES (1,(now() at time zone 'UTC'),1,(now() at time zone 'UTC'),true,'res_bank_HSBCBEBB','l10n_be_partner_bank','res.bank',761)
Nov 23 16:48:14 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:INFO:odoo.modules.registry:module l10n_be_partner_bank: creating or updating database tables
Nov 23 16:48:14 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:INFO:odoo.models:Prepare computation of res.bank.bban_code_list
Nov 23 16:48:15 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:INFO:odoo.modules.loading:loading l10n_be_partner_bank/data/res_bank_data.xml
Nov 23 16:48:15 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:INFO:odoo.models.unlink:User #1 deleted ir.model.data records with IDs: [564373]
Nov 23 16:48:15 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:INFO:odoo.models.unlink:User #1 deleted ir.model.data records with IDs: [564374]
Nov 23 16:48:15 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:INFO:odoo.models.unlink:User #1 deleted ir.model.data records with IDs: [564375]
Nov 23 16:48:16 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:INFO:odoo.models.unlink:User #1 deleted ir.model.data records with IDs: [564376]
Nov 23 16:48:16 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:ERROR:odoo.sql_db:bad query: INSERT INTO "res_bank" ("active", "bban_codes", "bic", "country", "create_date", "create_uid", "name", "write_date", "write_uid") VALUES (true, '700-709,750-774,800-816,963,975', 'AXABBE22', 20, '2025-11-23 16:48:13.311303', 1, 'AXA', '2025-11-23 16:48:13.311303', 1) RETURNING "id"
ERROR: duplicate key value violates unique constraint "res_bank_unique_bic"
DETAIL: Key (bic)=(AXABBE22) already exists.
Nov 23 16:48:16 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:WARNING:odoo.modules.loading:Transient module states were reset
Nov 23 16:48:16 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:ERROR:odoo.modules.registry:Failed to load registry
Traceback (most recent call last):
File "/opt/odoo/16.0/odoo/odoo/tools/convert.py", line 706, in _tag_root
f(rec)
File "/opt/odoo/16.0/odoo/odoo/tools/convert.py", line 607, in _tag_record
record = model._load_records([data], self.mode == 'update')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/models.py", line 4452, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/models.py", line 4363, in _load_records_create
return self.create(values)
^^^^^^^^^^^^^^^^^^^
File "<decorator-gen-300>", line 2, in create
File "/opt/odoo/16.0/odoo/odoo/api.py", line 431, in _model_create_multi
return create(self, arg)
^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo-addons/noviat/l10n_be_partner_bank/models/res_bank.py", line 91, in create
return super().create(vals_list)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "<decorator-gen-68>", line 2, in create
File "/opt/odoo/16.0/odoo/odoo/api.py", line 431, in _model_create_multi
return create(self, arg)
^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/addons/base/models/ir_fields.py", line 670, in create
recs = super().create(vals_list)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "<decorator-gen-15>", line 2, in create
File "/opt/odoo/16.0/odoo/odoo/api.py", line 431, in _model_create_multi
return create(self, arg)
^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/models.py", line 4019, in create
records = self._create(data_list)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/models.py", line 4200, in _create
cr.execute(
File "/opt/odoo/16.0/odoo/odoo/sql_db.py", line 324, in execute
res = self._obj.execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "res_bank_unique_bic"
DETAIL: Key (bic)=(AXABBE22) already exists.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/odoo/16.0/odoo/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/opt/odoo/16.0/odoo/odoo/modules/loading.py", line 489, in load_modules
processed_modules += load_marked_modules(cr, graph,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/modules/loading.py", line 374, in load_marked_modules
loaded, processed = load_module_graph(
^^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/modules/loading.py", line 233, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/opt/odoo/16.0/odoo/odoo/modules/loading.py", line 73, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/opt/odoo/16.0/odoo/odoo/tools/convert.py", line 771, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/opt/odoo/16.0/odoo/odoo/tools/convert.py", line 837, in convert_xml_import
obj.parse(doc.getroot())
File "/opt/odoo/16.0/odoo/odoo/tools/convert.py", line 757, in parse
self._tag_root(de)
File "/opt/odoo/16.0/odoo/odoo/tools/convert.py", line 719, in _tag_root
raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing /opt/odoo/16.0/odoo-addons/noviat/l10n_be_partner_bank/data/res_bank_data.xml:430, somewhere inside
<record id="res_bank_700" model="res.bank">
<field name="bban_codes">700-709,750-774,800-816,963,975</field>
<field name="bic">AXABBE22</field>
<field name="name">AXA</field>
<field name="country" ref="base.be"/>
</record>
Nov 23 16:48:16 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:CRITICAL:odoo.service.server:Failed to initialize database `www.xxx.be`.
Traceback (most recent call last):
File "/opt/odoo/16.0/odoo/odoo/tools/convert.py", line 706, in _tag_root
f(rec)
File "/opt/odoo/16.0/odoo/odoo/tools/convert.py", line 607, in _tag_record
record = model._load_records([data], self.mode == 'update')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/models.py", line 4452, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/models.py", line 4363, in _load_records_create
return self.create(values)
^^^^^^^^^^^^^^^^^^^
File "<decorator-gen-300>", line 2, in create
File "/opt/odoo/16.0/odoo/odoo/api.py", line 431, in _model_create_multi
return create(self, arg)
^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo-addons/noviat/l10n_be_partner_bank/models/res_bank.py", line 91, in create
return super().create(vals_list)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "<decorator-gen-68>", line 2, in create
File "/opt/odoo/16.0/odoo/odoo/api.py", line 431, in _model_create_multi
return create(self, arg)
^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/addons/base/models/ir_fields.py", line 670, in create
recs = super().create(vals_list)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "<decorator-gen-15>", line 2, in create
File "/opt/odoo/16.0/odoo/odoo/api.py", line 431, in _model_create_multi
return create(self, arg)
^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/models.py", line 4019, in create
records = self._create(data_list)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/models.py", line 4200, in _create
cr.execute(
File "/opt/odoo/16.0/odoo/odoo/sql_db.py", line 324, in execute
res = self._obj.execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "res_bank_unique_bic"
DETAIL: Key (bic)=(AXABBE22) already exists.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/odoo/16.0/odoo/odoo/service/server.py", line 1333, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<decorator-gen-16>", line 2, in new
File "/opt/odoo/16.0/odoo/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/opt/odoo/16.0/odoo/odoo/modules/loading.py", line 489, in load_modules
processed_modules += load_marked_modules(cr, graph,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/modules/loading.py", line 374, in load_marked_modules
loaded, processed = load_module_graph(
^^^^^^^^^^^^^^^^^^
File "/opt/odoo/16.0/odoo/odoo/modules/loading.py", line 233, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/opt/odoo/16.0/odoo/odoo/modules/loading.py", line 73, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/opt/odoo/16.0/odoo/odoo/tools/convert.py", line 771, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/opt/odoo/16.0/odoo/odoo/tools/convert.py", line 837, in convert_xml_import
obj.parse(doc.getroot())
File "/opt/odoo/16.0/odoo/odoo/tools/convert.py", line 757, in parse
self._tag_root(de)
File "/opt/odoo/16.0/odoo/odoo/tools/convert.py", line 719, in _tag_root
raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing /opt/odoo/16.0/odoo-addons/noviat/l10n_be_partner_bank/data/res_bank_data.xml:430, somewhere inside
<record id="res_bank_700" model="res.bank">
<field name="bban_codes">700-709,750-774,800-816,963,975</field>
<field name="bic">AXABBE22</field>
<field name="name">AXA</field>
<field name="country" ref="base.be"/>
</record>
Nov 23 16:48:16 odoo-16 python3[17140]: Odoo Server 16.0:www.xxx.be:INFO:odoo.service.server:Stopping gracefully
Best Regards,
Dear Try this:
Fix Error: duplicate key value violates unique constraint "res_bank_unique_bic" - Bank AXABBE22 already exists.
Solution - Run in PostgreSQL:
-- Find duplicate banks
SELECT id, name, bic FROM res_bank WHERE bic = 'AXABBE22';
-- Keep the first one, delete duplicates
DELETE FROM res_bank WHERE bic = 'AXABBE22'
AND id NOT IN (SELECT MIN(id) FROM res_bank WHERE bic = 'AXABBE22');
Dear
Touch down ;-)
Migration done.
I am checking if everything is ok now.
Do you have any email to reach you in pm ?
Best Regards,
Hi,
Great to hear the migration has been completed.
Regarding contacting me privately, I don't have a personal email address I can share, but you can always reach me here anytime or connect with me on LinkedIn.
Best regards,