[IMP] sale_stock: Show only 2 dates after delivery
In order to ease user comparison of expected vs actual delivery date in sales orders, we make it so there are only 2 dates displayed in the form related to expected/actual delivery dates. This is done by hiding the 'expected_date' after the first delivery has occurred (i.e. 'effective_date' is non-empty) when a 'commitment_date' value is set. If no 'commitment_date' value is set, then we display the 'expected_date' so users still have a date to compare to. This is addresses specification 10 of overall usability improvement task. closes odoo/odoo#45724 Task: 2041853 Related: odoo/enterprise#8566 Related: odoo/upgrade#904 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit is contained in:
@@ -663,7 +663,7 @@
|
||||
<group>
|
||||
<group name="sale_shipping">
|
||||
<label for="commitment_date" string="Delivery Date"/>
|
||||
<div class="o_row">
|
||||
<div name="commitment_date_div" class="o_row">
|
||||
<field name="commitment_date"/> <span class="text-muted">Expected: <field name="expected_date" widget="date"/></span>
|
||||
</div>
|
||||
</group>
|
||||
|
||||
@@ -29,7 +29,11 @@
|
||||
<field name="show_json_popover" invisible="1"/>
|
||||
<field string=" " name="json_popover" widget="stock_rescheduling_popover" attrs="{'invisible': [('show_json_popover', '=', False)]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='sale_shipping']" position="inside">
|
||||
<xpath expr="//div[@name='commitment_date_div']" position="replace">
|
||||
<div class="o_row">
|
||||
<field name="commitment_date"/>
|
||||
<span class="text-muted" attrs="{'invisible': [('effective_date', '!=', False), ('commitment_date', '!=', False)]}">Expected: <field name="expected_date" widget="date"/></span>
|
||||
</div>
|
||||
<field name="effective_date" attrs="{'invisible': [('effective_date', '=', False)]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//page/field[@name='order_line']/form/group/group/field[@name='price_unit']" position="before">
|
||||
|
||||
Reference in New Issue
Block a user