跳至内容
菜单
此问题已终结
1 回复
526 查看

i wanted to remove the add line from this tree view but it's not working 

this is my code :


<xpath expr="//group" position="after">
<h5> <strong>Products</strong> </h5>
<field name="picking_ids">
<tree create="false" delete="false" editable="false" multi_edit="0">
<field name="company_id" invisible="1"/>
<field name="name"/>
<field name="scheduled_date"/>
<field name="state"/>
<field name="location_id"/>
<field name="currency_id" invisible="1"/>
<field name="amount_total" sum="Total delivered" widget="monetary" optional="show"/>
</tree>
</field>
<h5><strong>Fees</strong> </h5>
<field name="type_service_ids" >
<tree create="false" delete="true">
<field name="name" />
<field name="price_subtotal" string="Fees amount"/>


</tree>
</field>

knowing that i inherites the create invoice view to show the picking that is been invoiced yet i still can add a line although im using the create=false editable=false attributes 


形象
丢弃

Did you upgrade the module?

Can you share the whole code because this should work fine

最佳答案

 Try only to make "picking_ids" readonly like this :

<field name="picking_ids" readonly="True">
<tree>
<field name="company_id" invisible="1"/>
<field name="name"/>
<field name="scheduled_date"/>
<field name="state"/>
<field name="location_id"/>
<field name="currency_id" invisible="1"/>
<field name="amount_total" sum="Total delivered" widget="monetary" optional="show"/>
</tree>
</field>
<h5><strong>Fees</strong> </h5>
<field name="type_service_ids" >
<tree create="false" delete="true">
<field name="name" />
<field name="price_subtotal" string="Fees amount"/>


</tree>
</field>

形象
丢弃