Skip to Content
Menu
This question has been flagged
1 Reply
4701 Views

record id="account.group_account_manager" model="res.groups"
field name="name" Accountant /field
field name="implied_ids" eval="[(3, ref('account.group_account_invoice')), (4, ref('account.group_account_user'))]"/
field name="category_id" ref="base.module_category_accounting_accounting"/
/record

If anybody know please comment
Avatar
Discard
Best Answer

Hi,

In Odoo, the numbers 3, 4, 5, and 6 represent specific operations within the context of defining relationships or actions in Odoo models. These numbers are part of a syntax used for specifying operations within Odoo's XML files, particularly in defining relational fields.
Here's what each number represents:

1. (1, id, values): This represents the operation of creating a new record and linking it to the current record. id is the id of the record to create, and values represent the field values of the new record.
2. (2, id): This represents the operation of updating an existing record referenced by id.
3. (3, id): This represents the operation of unlinking or deleting the record referenced by id.
4. (4, id): This represents the operation of linking an existing record referenced by id.
5. (5): This represents the operation of unlinking all existing linked records.
6. (6, 0, [ids]): This represents the operation of replacing existing linked records with the records specified in ids.

In the provided XML snippet, the eval attribute is used to dynamically evaluate expressions during XML processing. Specifically, it's being used to define the implied_ids field of a record in the res.groups model. This field is typically used to imply membership to other groups in Odoo.

So, (3, ref('account.group_account_invoice')) means to unlink the group with the ID referenced by account.group_account_invoice, and (4, ref('account.group_account_user')) means to link the group with the ID referenced by account.group_account_user. These operations are applied to the implied_ids field of the account.group_account_manager group.


Regards

Avatar
Discard
Related Posts Replies Views Activity
4
May 25
2445
2
May 25
5777
1
Mar 25
1622
4
Mar 25
4414
3
Feb 25
5395