Skip to content

Commit be47b61

Browse files
committed
[FIX] stock: display the forecast symbol on outgoing SM
To reproduce the issue: 1. Create a storable product P 2. Update the on-hand quantity: 5 x P 3. Create a planned delivery order with 4 x P - Note: once saved, the forecast symbole is green 4. On the delivery order, set the quantity to 5 and save Error: The symbol is now red, which is incorrect: there are 5 available P in the stock The color condition is incorrect, when `forecast_availability` is equal to zero, it means that there will be just the right quantity: https://github.com/odoo/odoo/blob/892232b5aef42dd2706cb9d1d027b1c463ca50dd/addons/stock/models/stock_move.py#L446-L448 task-2822157 X-original-commit: b49577d Part-of: odoo#94292
1 parent 230f164 commit be47b61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addons/stock/views/stock_picking_views.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,9 @@
390390
<field name="product_packaging_id" groups="product.group_stock_packaging"/>
391391
<field name="product_uom_qty" string="Demand" attrs="{'column_invisible': [('parent.immediate_transfer', '=', True)], 'readonly': ['|', ('is_initial_demand_editable', '=', False), '&amp;', '&amp;', ('show_operations', '=', True), ('is_locked', '=', True), ('is_initial_demand_editable', '=', False)]}"/>
392392
<button type="object" name="action_product_forecast_report" title="Forecast Report" icon="fa-area-chart"
393-
attrs="{'invisible': ['|', ('forecast_availability', '&lt;=', 0), '|', ('parent.immediate_transfer', '=', True), '&amp;', ('parent.picking_type_code', '=', 'outgoing'), ('state', '!=', 'draft')]}"/>
393+
attrs="{'invisible': ['|', ('forecast_availability', '&lt;', 0), '|', ('parent.immediate_transfer', '=', True), '&amp;', ('parent.picking_type_code', '=', 'outgoing'), ('state', '!=', 'draft')]}"/>
394394
<button type="object" name="action_product_forecast_report" title="Forecast Report" icon="fa-area-chart text-danger"
395-
attrs="{'invisible': ['|', ('forecast_availability', '&gt;', 0), '|', ('parent.immediate_transfer', '=', True), '&amp;', ('parent.picking_type_code', '=', 'outgoing'), ('state', '!=', 'draft')]}"/>
395+
attrs="{'invisible': ['|', ('forecast_availability', '&gt;=', 0), '|', ('parent.immediate_transfer', '=', True), '&amp;', ('parent.picking_type_code', '=', 'outgoing'), ('state', '!=', 'draft')]}"/>
396396
<field name="forecast_expected_date" invisible="1"/>
397397
<field name="forecast_availability" string="Reserved"
398398
attrs="{'column_invisible': ['|', '|', ('parent.state', 'in', ['draft', 'done']), ('parent.picking_type_code', '!=', 'outgoing'), ('parent.immediate_transfer', '=', True)]}" widget="forecast_widget"/>

0 commit comments

Comments
 (0)