Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
4729 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
4
Mei 25
2502
2
Mei 25
5863
1
Mar 25
1687
4
Mar 25
4469
3
Feb 25
5473