can anyone tem le clear answer. why this field is used for form or list view
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
From documentation:
This field priority is available in the view definition, and is 16 by default. By default, OpenERP will display a model using the view with the highest priority (the smallest number). For example, imagine we have two views for a simple model. The model client with two fields : firstname and lastname. We will define two views, one which shows the firstname first, and the other one which shows the lastname first.
<!--
Here is the first view for the model 'client'.
We don't specify a priority field, which means
by default 16.
-->
<record model="ir.ui.view" id="client_form_view_1">
<field name="name">client.form.view1</field>
<field name="model">client</field>
<field name="type">form</fiel>
<field name="arch" type="xml">
<field name="firstname"/>
<field name="lastname"/>
</field>
</record>
<!--
A second view, which show fields in an other order.
We specify a priority of 15.
-->
<record model="ir.ui.view" id="client_form_view_2">
<field name="name">client.form.view2</field>
<field name="model">client</field>
<field name="priority" eval="15"/>
<field name="type">form</fiel>
<field name="arch" type="xml">
<field name="lastname"/>
<field name="firstname"/>
</field>
</record>
Now, each time OpenERP will have to show a form view for our object client, it will have the choice between two views. It will always use the second one, because it has a higher priority ! Unless you tell it to use the first one !
thank for reply. Are you explained well .
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký