Skip to content
Snippets Groups Projects
Commit 95414e8c authored by Walid's avatar Walid
Browse files

[FIX] stock: forecast button color


Steps to reproduce:
- Enable multistep routes (3 steps delivery)
- Create a new storable product (0 on hand quantity)
- Confirm an SO with that product

Bug:
forecast button is correctly red on the SO line but it's green on the
stock pickings

Fix:
button should be green if it's possible to reserve quantity red otherwise

opw-3440627

closes odoo/odoo#134841

X-original-commit: 0312c1bdc371e5a841b8d9e620c9fd7a49782b15
Signed-off-by: default avatarQuentin Wolfs (quwo) <quwo@odoo.com>
Signed-off-by: default avatarWalid Hanniche (waha) <waha@odoo.com>
parent fd84b63c
Branches
Tags
No related merge requests found
......@@ -280,9 +280,9 @@
<field name="product_packaging_id" groups="product.group_stock_packaging"/>
<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)]}"/>
<button type="object" name="action_product_forecast_report" title="Forecast Report" icon="fa-area-chart"
attrs="{'invisible': ['|', ('forecast_availability', '&lt;', 0), '|', ('parent.immediate_transfer', '=', True), '&amp;', ('parent.picking_type_code', '=', 'outgoing'), ('state', '!=', 'draft')]}"/>
attrs="{'invisible': ['|', ('forecast_availability', '&lt;=', 0), '|', ('parent.immediate_transfer', '=', True), '&amp;', ('parent.picking_type_code', '=', 'outgoing'), ('state', '!=', 'draft')]}"/>
<button type="object" name="action_product_forecast_report" title="Forecast Report" icon="fa-area-chart text-danger"
attrs="{'invisible': ['|', ('forecast_availability', '&gt;=', 0), '|', ('parent.immediate_transfer', '=', True), '&amp;', ('parent.picking_type_code', '=', 'outgoing'), ('state', '!=', 'draft')]}"/>
attrs="{'invisible': ['|', ('forecast_availability', '&gt;', 0), '|', ('parent.immediate_transfer', '=', True), '&amp;', ('parent.picking_type_code', '=', 'outgoing'), ('state', '!=', 'draft')]}"/>
<field name="forecast_expected_date" invisible="1"/>
<field name="forecast_availability" string="Reserved"
attrs="{'column_invisible': ['|', '|', ('parent.state', 'in', ['draft', 'done']), ('parent.picking_type_code', '!=', 'outgoing'), ('parent.immediate_transfer', '=', True)]}" widget="forecast_widget"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment