Good day all
I am experiencing the following issue during my migration to Odoo 16 from v15
Inherited view cannot have 'Groups' define on the record. Use 'groups' attributes inside the view definition
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Good day all
I am experiencing the following issue during my migration to Odoo 16 from v15
Inherited view cannot have 'Groups' define on the record. Use 'groups' attributes inside the view definition
good afternoon Mario,
I'm trying to upgrade from odoo15 to 16 and I'm running into the same problem. were you able to solve it? how did you achieve it?
Thank you,
All the best
Good day. Sorry for the late response. What can I do to specifically trace which addon code is causing the problem here then. I am relatively new to Odoo.
In the server log, I am seeing the following output, not sure if this could be related :
2023-12-19 07:18:21,527 18606 INFO bitnami_odoo odoo.modules.loading: Loading module product (33/117)
2023-12-19 07:18:21,714 18606 INFO bitnami_odoo odoo.modules.registry: module product: creating or updating database tables
2023-12-19 07:18:22,299 18606 INFO bitnami_odoo odoo.schema: Table 'product_supplierinfo': unable to set NOT NULL on column 'partner_id'
2023-12-19 07:18:22,346 18606 INFO bitnami_odoo odoo.schema: Keep unexpected index product_template_message_main_attachment_id_index on table product_template
2023-12-19 07:18:22,346 18606 INFO bitnami_odoo odoo.schema: Keep unexpected index product_product_message_main_attachment_id_index on table product_product
2023-12-19 07:18:22,358 18606 INFO bitnami_odoo odoo.schema: Keep unexpected index decimal_precision_name_index on table decimal_precision
2023-12-19 07:18:22,361 18606 INFO bitnami_odoo odoo.schema: Keep unexpected index res_partner_message_main_attachment_id_index on table res_partner
2023-12-19 07:18:23,162 18606 CRITICAL bitnami_odoo odoo.service.server: Failed to initialize database `bitnami_odoo`.
Traceback (most recent call last):
File "/opt/bitnami/odoo/lib/odoo-16.0.post20231219-py3.8.egg/odoo/service/server\.py",\ line\ 1299,\ in\ preload_registries
\ \ registry\ =\ Registry\.new\(dbname,\ update_module=update_module\)
\ File\ "",\ line\ 2,\ in\ new
\ File\ "/opt/bitnami/odoo/lib/odoo\-16\.0\.post20231219\-py3\.8\.egg/odoo/tools/func\.py",\ line\ 87,\ in\ locked
\ \ return\ func\(inst,\ \*args,\ \*\*kwargs\)
\ File\ "/opt/bitnami/odoo/lib/odoo\-16\.0\.post20231219\-py3\.8\.egg/odoo/modules/registry\.py",\ line\ 90,\ in\ new
\ \ odoo\.modules\.load_modules\(registry,\ force_demo,\ status,\ update_module\)
\ File\ "/opt/bitnami/odoo/lib/odoo\-16\.0\.post20231219\-py3\.8\.egg/odoo/modules/loading\.py",\ line\ 484,\ in\ load_modules
\ \ processed_modules\ \+=\ load_marked_modules\(cr,\ graph,
\ File\ "/opt/bitnami/odoo/lib/odoo\-16\.0\.post20231219\-py3\.8\.egg/odoo/modules/loading\.py",\ line\ 372,\ in\ load_marked_modules
\ \ loaded,\ processed\ =\ load_module_graph\(
\ File\ "/opt/bitnami/odoo/lib/odoo\-16\.0\.post20231219\-py3\.8\.egg/odoo/modules/loading\.py",\ line\ 231,\ in\ load_module_graph
\ \ load_data\(cr,\ idref,\ mode,\ kind='data',\ package=package\)
\ File\ "/opt/bitnami/odoo/lib/odoo\-16\.0\.post20231219\-py3\.8\.egg/odoo/modules/loading\.py",\ line\ 71,\ in\ load_data
\ \ tools\.convert_file\(cr,\ package\.name,\ filename,\ idref,\ mode,\ noupdate,\ kind\)
\ File\ "/opt/bitnami/odoo/lib/odoo\-16\.0\.post20231219\-py3\.8\.egg/odoo/tools/convert\.py",\ line\ 763,\ in\ convert_file
\ \ convert_xml_import\(cr,\ module,\ fp,\ idref,\ mode,\ noupdate\)
\ File\ "/opt/bitnami/odoo/lib/odoo\-16\.0\.post20231219\-py3\.8\.egg/odoo/tools/convert\.py",\ line\ 829,\ in\ convert_xml_import
\ \ obj\.parse\(doc\.getroot\(\)\)
\ File\ "/opt/bitnami/odoo/lib/odoo\-16\.0\.post20231219\-py3\.8\.egg/odoo/tools/convert\.py",\ line\ 749,\ in\ parse
\ \ self\._tag_root\(de\)
\ File\ "/opt/bitnami/odoo/lib/odoo\-16\.0\.post20231219\-py3\.8\.egg/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/bitnami/odoo/lib/odoo-16.0.post20231219-py3.8.egg/odoo/addons/product/views/res_partner_views.xml:3
Inherited view cannot have 'Groups' define on the record. Use 'groups' attributes inside the view definition
View error context:
'-no context-'
Check if you're using any custom addons, and replace the code snippet of xml which includes groups_id with <t groups/> attribute .
Hi Bella
Okay, there are 11 xml files which contain the "groups_id" field name. So just to make sure I am doing this properly, do I just replace the field now with this?
<field name="t groups" eval="[(5,0,0)]" />
############
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<menuitem id="account.menu_finance" name="Accounting"/>
<menuitem id="menu_account_templates"
sequence="100"
name="Templates"
parent="account.menu_finance_configuration"
groups="base.group_no_one"/>
<record id="account.menu_action_account_moves_all" model="ir.ui.menu">
<field name="groups_id" eval="[(5,0,0)]" />
</record>
</odoo>
Hi,
Actually, the code comes from the module product and the views specified in the res_partner_views.xml file, the given code is in the Addon code so the current issue does not come from this code can you please make it clear that depends on the module. If the mentioned code is from your custom module then try to change the record ID and names of the given codealso please make ensure the base module is dependent on your module
Hope it helps
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_partner_property_form" model="ir.ui.view">
<field name="name">res.partner.product.property.form.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<group name="sale">
<field name="property_product_pricelist" groups="product.group_product_pricelist" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}"/>
<div name="parent_pricelists" groups="product.group_product_pricelist" colspan="2" attrs="{'invisible': ['|',('is_company','=',True),('parent_id','=',False)]}">
<p>Pricelists are managed on <button name="open_commercial_entity" type="object" string="the parent company" class="oe_link"/></p>
</div>
</group>
</field>
</record>
</odoo>