[IMP] sale: improve invoiceable lines decoration

purpose of this task to improve invoiceable lines decoration

in view_order_form
- decoration is removed from the order line tree view
- decoration applied to fields
  -  product_uom_qty
  -  qty_delivered
  -  qty_invoiced

closes odoo/odoo#53402

Taskid: 2282277
Closes: odoo#53402
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
shs-odoo
2020-06-22 11:20:26 +00:00
parent 999507007e
commit db0de87ead
+3 -1
View File
@@ -444,7 +444,6 @@
<tree
string="Sales Order Lines"
editable="bottom"
decoration-info="(not display_type and invoice_status == 'to invoice')"
>
<control>
<create name="add_product_control" string="Add a product"/>
@@ -508,6 +507,7 @@
/>
<field
name="product_uom_qty"
decoration-info="(not display_type and invoice_status == 'to invoice')" decoration-bf="(not display_type and invoice_status == 'to invoice')"
context="{
'partner_id': parent.partner_id,
'quantity': product_uom_qty,
@@ -518,6 +518,7 @@
/>
<field
name="qty_delivered"
decoration-info="(not display_type and invoice_status == 'to invoice')" decoration-bf="(not display_type and invoice_status == 'to invoice')"
string="Delivered"
attrs="{
'column_invisible': [('parent.state', 'not in', ['sale', 'done'])],
@@ -529,6 +530,7 @@
<field name="qty_delivered_method" invisible="1"/>
<field
name="qty_invoiced"
decoration-info="(not display_type and invoice_status == 'to invoice')" decoration-bf="(not display_type and invoice_status == 'to invoice')"
string="Invoiced"
attrs="{'column_invisible': [('parent.state', 'not in', ['sale', 'done'])]}"
optional="show"