how can I specify which views to use?
Hi,
For example, I have a class A (test_a), with a field one2many, line_ids. line_ids points to other class, B (test_b). In form definition for class A, I want to display this field with different views.
With normal method, I use like this
<record id="test1" model="ir.ui.view">
<field name="name"
<field name="model"
<field name="type"
<field name="arch" type="xml">
<field name="line_ids" >
<tree>
</tree>
<form>
</form>
</field>
</field>
</record>
But I want to do this way. I define different views for class test_b. Then in form definition for class A, I just specify which view to use, for example, I want to use view test_b_2. How can I specify this in class A?
<record id="test_b_1" model="ir.ui.view">
<field name="name"
<field name="model"
<field name="type"
<field name="arch" type="xml">
<form>
</form>
</field>
</record>
<record id="test_b_2" model="ir.ui.view">
<field name="name"
<field name="model"
<field name="type"
<field name="arch" type="xml">
<form>
</form>
</field>
</record>
Thanks,
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Cuong for more information if necessary.