Can the _descricpion field be different for multiple views using the same model?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
Hi
In Odoo, the _description field is a special field used to define the description or label for a model. This field is used to provide a human-readable name for the model and is typically displayed in various places throughout the Odoo user interface. By default, the _description field is static and remains the same for all views using the same model. This means that regardless of the view you are using, the description will be consistent.
To achieve this, you can create a new view for the model and specify the desired value for the _description field within that view. When the view is used, the overridden description will be displayed instead of the default one.
Here's an example of how you can define a custom description for a specific view in Odoo XML:
<record id="custom_view_id" model="ir.ui.view">
<field name="name">Custom View</field>
<field name="model">your.model</
<field name="inherit_id" ref="base.view_form"/>
<field name="arch" type="xml">
<field name="_description" position="attributes">
<attribute name="string">Custom Description</attribute>
</field>
</field>
</record>
Hope it helps
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się