[IMP] sale,sale_stock: use "attributes" instead of "replace" position

Minor update to task 2041853 specification 10: hide "Expected date" if
delivery took place. Replace the position="replace" with the more
long term maintainable position="attributes".

Updates Task: 2041853
This commit is contained in:
Tiffany Chang (tic)
2020-07-03 11:54:08 +00:00
parent a60527bde7
commit a952829c16
2 changed files with 7 additions and 1 deletions
+2 -1
View File
@@ -677,7 +677,8 @@
<group name="sale_shipping">
<label for="commitment_date" string="Delivery Date"/>
<div name="commitment_date_div" class="o_row">
<field name="commitment_date"/> <span class="text-muted">Expected: <field name="expected_date" widget="date"/></span>
<field name="commitment_date"/>
<span name="expected_date_span" class="text-muted">Expected: <field name="expected_date" widget="date"/></span>
</div>
</group>
<group string="Reporting" name="sale_reporting" groups="base.group_no_one">
@@ -25,6 +25,11 @@
<field name="incoterm" widget="selection" groups="sale_stock.group_display_incoterm"/>
<field name="picking_policy" required="True"/>
</xpath>
<xpath expr="//span[@name='expected_date_span']" position="attributes">
<attribute name="attrs">
{'invisible': [('effective_date', '!=', False), ('commitment_date', '!=', False)]}
</attribute>
</xpath>
<xpath expr="//div[@name='commitment_date_div']" position="replace">
<div class="o_row">
<field name="commitment_date"/>