From f93fcaffb5287bc6ff52e33e3cc9edecb50058c4 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 1 Aug 2019 13:52:31 +0000 Subject: [PATCH] [FIX] stock_dropshipping: Updating dropship product Steps to reproduce the bug: - Install stock_dropshipping module and enable Routes on SO lines - Create a storable product P with a supplier S - Create a SO with P and set this line with the route dropship - Confirm the SO ( a PO has been created to S with P) - Change P on the SO with an other product Bug: The product P stayed on the PO. So a product linked to a PO line cannot be changed on a SO. Do not forward-port in 12.0 and upper opw:2040249 closes odoo/odoo#35454 Signed-off-by: Simon Goffin (sig) --- addons/stock_dropshipping/__manifest__.py | 2 +- .../views/sale_order_views.xml | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 addons/stock_dropshipping/views/sale_order_views.xml diff --git a/addons/stock_dropshipping/__manifest__.py b/addons/stock_dropshipping/__manifest__.py index c00b3985a63..5c917c2d67b 100644 --- a/addons/stock_dropshipping/__manifest__.py +++ b/addons/stock_dropshipping/__manifest__.py @@ -22,7 +22,7 @@ internal transfer document is needed. """, 'website': 'https://www.odoo.com/page/warehouse', 'depends': ['purchase', 'sale_stock'], - 'data': ['data/stock_data.xml'], + 'data': ['data/stock_data.xml', 'views/sale_order_views.xml'], 'test': [ '../account/test/account_minimal_test.xml', '../stock_account/test/stock_valuation_account.xml', diff --git a/addons/stock_dropshipping/views/sale_order_views.xml b/addons/stock_dropshipping/views/sale_order_views.xml new file mode 100644 index 00000000000..8d684e365bf --- /dev/null +++ b/addons/stock_dropshipping/views/sale_order_views.xml @@ -0,0 +1,25 @@ + + + + + + sale.order.form.sale.dropshipping + sale.order + + + + + + + {'readonly': ['|', ('product_updatable', '=', False), ('purchase_line_ids', '!=', [])]} + + + + + + {'readonly': ['|', ('product_updatable', '=', False), ('purchase_line_ids', '!=', [])]} + + + + +