Odoo Programming
Odoo Programming
<field name=” chosen field where to put the new field” position=” after”>
</field>
"data": [
"views/ mymodule _menu.xml",
],
It will be visible later once we add submenus and the corresponding access
permissions.
- <record>: This tag is used to define a record that will be created or modified in the
database.
- id: This is the unique identifier for the record within the module. It’s used to reference
this group elsewhere in the Odoo configuration.
- model: This specifies the model that the record belongs to. In this case res.groups:
refers to the model for user groups in Odoo.
- <field>: This tag defines the value for a field of the record.
o name: This attribute specifies the field’s name within the model. Here, it’s
setting the name of the group.
o The value " User" is the human-readable name for the group that will appear
in the Odoo interface.
- implied_ids: which refers to other security groups that this group should inherit
permissions from.
- eval: This attribute contains a list of tuples that represent commands for the server to
execute.
o (4, ref('base.group_user')): This tuple is a command that tells Odoo to add a
reference to another group.
4: This is the command code for adding an item to a many2many or
one2many field.
ref('base.group_user'): This function retrieves the reference to the
base.group_user, which is the base user group in Odoo.