Skip to Content
Menu
This question has been flagged
1 Reply
520 Views

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 


Avatar
Discard

Did you upgrade the module?

Can you share the whole code because this should work fine

Best Answer

 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>

Avatar
Discard