【发布时间】:2018-09-13 13:36:54
【问题描述】:
我在 one2many 树视图上有字段(复选框是布尔字段,销售人员是 many2one)。 现在,我想在基于布尔字段的 one2many 树视图中隐藏一个字段。 当复选框(在 one2many 字段中)为 true 时,salesperson(field_name=salesman_id) 字段为隐藏(也在 one2many 字段中)。
我使用了下面的代码,但不起作用。
<xpath expr="//form[1]/sheet[1]/notebook[1]/page[1]/field[@name='order_line']/tree[1]/field[@name='price_unit']" position="after">
<field name="salesman_id" attrs="{'invisible':[('checkbox', '=', True)] }"/>
</xpath>
请找到附件。 enter image description here 怎么做。 提前致谢。
【问题讨论】:
-
您能提供更多信息吗?完整的视图扩展?,python 字段定义?