Convert boolean on product into MultiValue field
As discussed on https://discuss.tryton.org/t/products-relating-to-specific-company-multiple-companies/4372 in multi-company environment sometimes users may not want to share some product between companies.
Indeed instead of using record rule to hide those product I think we should have a better design in core by converting Boolean like salable
, purchasable
etc. into MultiValue. The problem is that they can not be strict MultiValue because we need to be able to search on them. So the idea is to use a Function field which works like MultiValue but it is searchable thanks to the where
clause (and a unique constraint).