From 282945a5a5c4236592d63850d47211d2d415573e Mon Sep 17 00:00:00 2001 From: "Victor Piryns (pivi)" Date: Fri, 4 Nov 2022 08:12:17 +0000 Subject: [PATCH] [IMP] product, sale: define product exclusions with their products Following recent changes in stable deleting/archiving product variants forbidden by attributes exclusions, installing some modules after the sale app failed because the product `product_product_4d` specified in `product` was deleted by the attributes exclusions of the `sale` module. This has been fixed in stable by removing all references to this xml_id. Nevertheless, this bug showed us that the definition of attributes exclusion for a product in another module than the one creating it is a bad idea, as it modifies what's allowed or not with that product, leading to potential database inconsistencies. This commit moves the exclusions targeting products from the `product` module to the `product` module, to reduce the risks of other modules using/referencing the deleted/modified products in a way conflicting with the exclusions. opw-3040916 closes odoo/odoo#104020 Signed-off-by: Victor Feyens (vfe) --- addons/product/data/product_demo.xml | 29 +++++++++++++++++++++++++ addons/sale/data/product_demo.xml | 32 ---------------------------- 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/addons/product/data/product_demo.xml b/addons/product/data/product_demo.xml index e53ec843105..573d00030c8 100644 --- a/addons/product/data/product_demo.xml +++ b/addons/product/data/product_demo.xml @@ -395,6 +395,35 @@ 6.40 + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/sale/data/product_demo.xml b/addons/sale/data/product_demo.xml index c1abd119eda..69ea571b467 100644 --- a/addons/sale/data/product_demo.xml +++ b/addons/sale/data/product_demo.xml @@ -184,38 +184,6 @@ 0.01 - - - - - - - - - - - - - - - - - - - - - - - - - Deposit