У меня есть класс модели, содержащий несколько полей:
class AluminiumWorkLine(models.Model):
_name = 'project.plan.line'
check_measure_length = fields.Integer()
check_measure_height = fields.Integer()
check_measure = fields.Char(string='Check Measurement (mm)',
compute='_compute_check_measure')
subframe_length = fields.Integer()
subframe_height = fields.Integer()
subframe = fields.Char(string='Sub-frame Measurement(mm)',
compute='_compute_subframe')
mullum_length = fields.Integer()
mullum_height = fields.Integer()
mullum = fields.Char(string='Mullum / Tranzum Measurement(mm)',
compute='_compute_mullum')
production_length = fields.Integer()
production_height = fields.Integer()
production = fields.Char(string='Production Measurement(mm)',
compute='_compute_production')
У меня есть поля подрамника и mullum, которые я хочу отображать на разных страницах в одном и том же виде формы здесь:
<record id="project_task_inherit" model="ir.ui.view">
<field name="name">project.task.inherit</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='extra_info']" position="after">
<page name='aluminium_plan' string='Aluminium Work Plan' attrs="{'invisible': [('aluminium', '=', False)]}">
<field name="project_plan_line">
<form>
<group string="Work Plan Lines">
<group>
<label for="check_measure"/>
<div class="o_row">
<field name="check_measure_length"/>✕
<field name="check_measure_height"/>
<field name="check_measure" attrs="{'invisible': 1}"/>
</div>
**<label for="subframe"/>
<div class="o_row">
<field name="subframe_length"/>✕
<field name="subframe_height"/>
<field name="subframe" attrs="{'invisible': 1}"/>
</div>**
<label for="production_length"/>
<div class="o_row">
<field name="production_length"/>✕
<field name="production_height"/>
<field name="production" attrs="{'invisible': 1}"/>
</div>
</group>
</group>
</form>
<tree>
<field name="check_measure"/>
**<field name="subframe"/>**
<field name="production"/>
</tree>
</field>
</page>
<page name='curtain_plan' string='Curtain Wall Work Plan' attrs="{'invisible': [('curtain', '=', False)]}">
<field name="project_plan_line">
<form>
<group string="Work Plan Lines">
<group>
<label for="check_measure"/>
<div class="o_row">
<field name="check_measure_length"/>✕
<field name="check_measure_height"/>
<field name="check_measure" attrs="{'invisible': 1}"/>
</div>
**<label for="mullum"/>
<div class="o_row">
<field name="mullum_length"/>✕
<field name="mullum_height"/>
<field name="mullum" attrs="{'invisible': 1}"/>
</div>**
<label for="production_length"/>
<div class="o_row">
<field name="production_length"/>✕
<field name="production_height"/>
<field name="production" attrs="{'invisible': 1}"/>
</div>
</group>
</group>
</form>
<tree>
<field name="check_measure"/>
**<field name="mullum"/>**
<field name="production"/>
</tree>
</field>
</page>
</xpath>
</field>
</record>
Я ожидаю, что поле подкадра или поле mullum должно отображаться на разных страницах соответственно, но отображается только одно поле?