# Products relating to specific company (multiple companies)

**URL:** https://discuss.tryton.org/t/products-relating-to-specific-company-multiple-companies/4372
**Category:** User
**Created:** [July 2, 2021, 6:53pm UTC](https://discuss.tryton.org/t/products-relating-to-specific-company-multiple-companies/4372 "2021-07-02T18:53:15Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![locx](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/l/f04885/32.png) [@locx](https://discuss.tryton.org/u/locx)
#### Post date: [July 2, 2021, 6:53pm UTC](https://discuss.tryton.org/t/products-relating-to-specific-company-multiple-companies/4372/1 "2021-07-02T18:53:15Z")

</div>

Suppose I have two companies. Then each will sell its products under its own name.

Is it possible to have a user who can be configured to view/sell/purchase the products that relate to one specific company only?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [July 2, 2021, 7:53pm UTC](https://discuss.tryton.org/t/products-relating-to-specific-company-multiple-companies/4372/2 "2021-07-02T19:53:28Z")

</div>

In standard the products are always shared between companies. If you want to restrict them, you must customize the product model to store available companies and set proper rule.

---

<div class="post-metadata">

### Author: ![locx](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/l/f04885/32.png) [@locx](https://discuss.tryton.org/u/locx)
#### Post date: [July 3, 2021, 11:16am UTC](https://discuss.tryton.org/t/products-relating-to-specific-company-multiple-companies/4372/3 "2021-07-03T11:16:43Z")

</div>

Ok, suppose I just want to hide a particular product from a user.

I created a user group ‘Hide Test Product’ and created a record rule as follows (and added the user to the group).

 ![SharedScreenshot](https://discuss-cdn.tryton.org/uploads/default/original/2X/b/b2aa2c8f2bfb74faf68d40c8041120881f6729ea.jpeg)

But when I log in as the user, I can still see the product called ‘Test’, even though according to the rule, when the name is = ‘Test’, the Read Access is not allowed.

What is wrong here?

---

<div class="post-metadata">

### Author: ![locx](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/l/f04885/32.png) [@locx](https://discuss.tryton.org/u/locx)
#### Post date: [July 3, 2021, 2:20pm UTC](https://discuss.tryton.org/t/products-relating-to-specific-company-multiple-companies/4372/4 "2021-07-03T14:20:22Z")

</div>

So, to make it work as intended, you have to check the permissions boxes (read, write etc.)

I think the simplest solution is to simply put the products in a category named after the company name and create a record rule involving the product category.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [July 4, 2021, 7:32am UTC](https://discuss.tryton.org/t/products-relating-to-specific-company-multiple-companies/4372/5 "2021-07-04T07:32:09Z")

</div>

I filled [Convert boolean on product into MultiValue field (#10551) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/issue10551) to propose a better core design which will not require to use rules for such case.

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [August 3, 2021, 7:32am UTC](https://discuss.tryton.org/t/products-relating-to-specific-company-multiple-companies/4372/6 "2021-08-03T07:32:31Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
