From 10ede45cf52789f19dccbb527ee85928f1efc60d Mon Sep 17 00:00:00 2001 From: "Levi Siuzdak (sile)" Date: Fri, 27 Oct 2023 11:24:45 +0200 Subject: [PATCH] [FIX] product: keep package.company_id in view Versions: --------- - 16.0+ Steps to reproduce: ------------------- 1. install stock; 2. in Inventory settings, enable product packagings; 3. set the company_id of a product to current company; 4. in user settings, remove access to all other companies; 5. from the page of the edited product, add a package; 6. try to save changes. Problem: -------- User Error pops up due to incompatible companies on records. Cause: ------ As of version 16.0, a field with the `groups="base.group_multi_company"` attribute might as well not exist outside multi-company contexts, preventing the context that automatically added a company_id to a newly created package from working properly. Solution: --------- Add an invisible field containing the `company_id` with the `groups="!base.group_multi_company"` attribute. opw-3457782 X-original-commit: 0e4ae108cc191ca469770c456a341e455d664886 Part-of: odoo/odoo#140025 --- addons/product/views/product_packaging_views.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/product/views/product_packaging_views.xml b/addons/product/views/product_packaging_views.xml index cb0a61b7c9a..109dab4641d 100644 --- a/addons/product/views/product_packaging_views.xml +++ b/addons/product/views/product_packaging_views.xml @@ -13,6 +13,7 @@ +