diff --git a/product_multi_company/models/product_category.py b/product_multi_company/models/product_category.py index 1739ecba22a..3242c7b079f 100644 --- a/product_multi_company/models/product_category.py +++ b/product_multi_company/models/product_category.py @@ -16,7 +16,7 @@ class ProductCategory(models.Model): ) route_ids = fields.Many2many( - "stock.location.route", + "stock.route", "stock_location_route_categ", "categ_id", "route_id", diff --git a/product_multi_company/tests/test_product_multi_company.py b/product_multi_company/tests/test_product_multi_company.py index 55cb3de883b..d3ce649fec9 100644 --- a/product_multi_company/tests/test_product_multi_company.py +++ b/product_multi_company/tests/test_product_multi_company.py @@ -11,8 +11,7 @@ class TestProductMultiCompany(ProductMultiCompanyCommon, common.TransactionCase): def test_create_product(self): product = self.env["product.product"].create({"name": "Test"}) - company = self.env.company - self.assertTrue(company.id in product.company_ids.ids) + self.assertFalse(product.company_ids) def test_company_none(self): self.assertFalse(self.product_company_none.company_id) @@ -65,8 +64,5 @@ def test_uninstall(self): uninstall_hook(self.env.cr, None) rule = self.env.ref("product.product_comp_rule") - domain = ( - " ['|', ('company_id', '=', user.company_id.id), " - "('company_id', '=', False)]" - ) + domain = " [('company_id', 'in', [False, user.company_id.id])]" self.assertEqual(rule.domain_force, domain) diff --git a/product_multi_company/views/product_template_view.xml b/product_multi_company/views/product_template_view.xml index 3ebab497958..73c21032704 100644 --- a/product_multi_company/views/product_template_view.xml +++ b/product_multi_company/views/product_template_view.xml @@ -5,17 +5,23 @@ product.template - + 1 - - + + - +