Sale order: prevent from changing discount after invoice has been created

develop
Andreas Osim 2021-06-09 10:02:11 +02:00
parent eb0f62d2cb
commit 03b6cea8ac
1 changed files with 3 additions and 0 deletions

View File

@ -126,6 +126,9 @@
attrs="{'readonly': [('qty_invoiced', '>', 0)]}" options='{"fg_color": "red:price_change" }'/>
</xpath>
-->
<xpath expr="//field[@name='order_line']/tree//field[@name='discount']" position="replace">
<field name="discount" attrs="{'readonly':[('qty_invoiced','&gt;',0)]}"/>
</xpath>
<xpath expr="//field[@name='order_line']/tree//field[@name='price_unit']" position="after">
<field name="read_price" options='{"bg_color": "yellow:price_change" }' attrs="{'invisible': False,'readonly':[('from_designbox','=',True)]}"/>
<!-- <field name="read_price" colors="yellow:price_change==True"/> -->