Skip to Content
Menú
This question has been flagged
1 Respondre
4752 Vistes

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
Descartar
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
Descartar
Related Posts Respostes Vistes Activitat
4
de maig 25
2524
2
de maig 25
5906
1
de març 25
1696
4
de març 25
4520
3
de febr. 25
5523