[FIX] stock: display forecast widget on deliveries

Steps to reproduce:
- Create a Delivery
- Put any product, some quantity and save

Issue:
The forecast icon disappears as soon as the picking leaves its 'draft'
state.

closes odoo/odoo#140114

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
This commit is contained in:
clesgow
2023-10-27 21:36:50 +00:00
parent e24c655105
commit 3d434ea0d4
+1 -1
View File
@@ -322,7 +322,7 @@
invisible="quantity &gt; 0 or forecast_availability &gt; 0 or (parent.picking_type_code == 'outgoing' and state != 'draft')"/>
<field name="forecast_expected_date" column_invisible="True"/>
<field name="forecast_availability" string="Reserved"
column_invisible="True" widget="forecast_widget"/>
column_invisible="parent.state in ('draft', 'done') or parent.picking_type_code != 'outgoing'" widget="forecast_widget"/>
<field name="product_qty" readonly="1" column_invisible="True"/>
<field name="quantity" string="Quantity" readonly="not is_quantity_done_editable" column_invisible="parent.state=='draft'" decoration-danger="product_uom_qty and quantity > product_uom_qty and parent.state not in ['done', 'cancel']"/>
<field name="product_uom" readonly="state != 'draft' and not additional" options="{'no_open': True, 'no_create': True}" string="Unit" groups="uom.group_uom"/>