[v15 -> v16 Openupgrade] res_partner_views: Inherited view cannot have 'Groups' define on the record. Use 'groups' attributes inside the view definition #4343
bgomez-psitec
started this conversation in
General
Replies: 2 comments 6 replies
-
Hi! Did you manage to solve it? |
Beta Was this translation helpful? Give feedback.
1 reply
-
The problem is that there's an inherited view that is not removed as it was created manually (or just the groups assigned manually), and thus, it raises the error. Check that on your previous version, and you will need to remove or rest the groups on it before migrating. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hello,
First of all, thank you for helping the community and I hope you can help me. (I'm quite new, although I'm still studying)
I have been using Odoo in my business for almost two years with a version 14 community and some OCA module, which has worked correctly for me.
I have decided to update version 14 to 17, for which I have been able to update to version 15 and now I am updating to 16, always using OCA openupgrade.
My problem is that when migrating the database from v15 to v16 using the openupgrade-v16 script it shows me the following error:
2024-03-09 17:43:06,201 31738 DEBUG odoopsitec odoo.tools.convert: while parsing /opt/odoo/odoo/addons/product/views/res_partner_views.xml:3
La vista heredada no puede tener 'grupos' definidos en el registro. Use los atributos de 'grupos' dentro de la definición de la vista
View error context:
'-no context-'
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/tools/convert.py", line 698, in _tag_root
f(rec)
File "/opt/odoo/odoo/odoo/tools/convert.py", line 599, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/opt/odoo/odoo/odoo/models.py", line 4385, in _load_records
data['record']._load_records_write(data['values'])
File "/opt/odoo/odoo/odoo/addons/base/models/ir_ui_view.py", line 2217, in _load_records_write
super(View, self)._load_records_write(values)
File "/opt/odoo/odoo/odoo/models.py", line 4316, in _load_records_write
self.write(values)
File "/opt/odoo/odoo/odoo/addons/base/models/ir_ui_view.py", line 575, in write
res = super(View, self).write(self._compute_defaults(vals))
File "/opt/odoo/odoo/odoo/models.py", line 3798, in write
real_recs._validate_fields(vals, inverse_fields)
File "/opt/odoo/odoo/odoo/models.py", line 1359, in _validate_fields
check(self)
File "/opt/odoo/odoo/odoo/addons/base/models/ir_ui_view.py", line 484, in check_groups
raise ValidationError(("Inherited view cannot have 'Groups' define on the record. Use 'groups' attributes inside the view definition"))
odoo.exceptions.ValidationError: La vista heredada no puede tener 'grupos' definidos en el registro. Use los atributos de 'grupos' dentro de la definición de la vista
2024-03-09 17:43:06,230 31738 WARNING odoopsitec odoo.modules.loading: Transient module states were reset
2024-03-09 17:43:06,232 31738 ERROR odoopsitec odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/modules/registry.py", line 90, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/opt/odoo/odoo/odoo/modules/loading.py", line 484, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/opt/odoo/odoo/odoo/modules/loading.py", line 372, in load_marked_modules
loaded, processed = load_module_graph(
File "/opt/odoo/odoo/odoo/modules/loading.py", line 231, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/opt/odoo/odoo/odoo/modules/loading.py", line 71, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/opt/odoo/odoo/odoo/tools/convert.py", line 763, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/opt/odoo/odoo/odoo/tools/convert.py", line 829, in convert_xml_import
obj.parse(doc.getroot())
File "/opt/odoo/odoo/odoo/tools/convert.py", line 749, in parse
self._tag_root(de)
File "/opt/odoo/odoo/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 /opt/odoo/odoo/addons/product/views/res_partner_views.xml:3
La vista heredada no puede tener 'grupos' definidos en el registro. Use los atributos de 'grupos' dentro de la definición de la vista
View error context:
'-no context-'
2024-03-09 17:43:06,234 31738 CRITICAL odoopsitec odoo.service.server: Failed to initialize database odoopsitec.
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/service/server.py", line 1299, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "", line 2, in new
File "/opt/odoo/odoo/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/opt/odoo/odoo/odoo/modules/registry.py", line 90, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/opt/odoo/odoo/odoo/modules/loading.py", line 484, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/opt/odoo/odoo/odoo/modules/loading.py", line 372, in load_marked_modules
loaded, processed = load_module_graph(
File "/opt/odoo/odoo/odoo/modules/loading.py", line 231, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/opt/odoo/odoo/odoo/modules/loading.py", line 71, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/opt/odoo/odoo/odoo/tools/convert.py", line 763, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/opt/odoo/odoo/odoo/tools/convert.py", line 829, in convert_xml_import
obj.parse(doc.getroot())
File "/opt/odoo/odoo/odoo/tools/convert.py", line 749, in parse
self._tag_root(de)
File "/opt/odoo/odoo/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 /opt/odoo/odoo/addons/product/views/res_partner_views.xml:3
La vista heredada no puede tener 'grupos' definidos en el registro. Use los atributos de 'grupos' dentro de la definición de la vista
View error context:
'-no context-'
I have reviewed the res_partner_views.xml file and its content is as follows:
I have made different modifications to this file without success. I have searched on Google and although I have not found much information, I have been able to investigate a possible solution, which has not worked for me and I always have this message in the migration.
Could you guide me?
Thank you so much
Beta Was this translation helpful? Give feedback.
All reactions