Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4747 Widoki

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
Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
4
maj 25
2513
2
maj 25
5878
1
mar 25
1693
4
mar 25
4491
3
lut 25
5492