This question has been flagged
4 Replies
3924 Views

I have a multi company setup where both companies have a separate chart of accounts.

When creating a product for company-A I still can choose all accounts from Company-B for the income or expense account even if the prodct belongs to company-A. Same mechanics goes for Customer/Suppliers/employees.

Is that designed to be like that or a bug? If it is design ... is there any benefit from this that I just don't see?

Avatar
Discard
Best Answer
  • Apply record rules. Record rules can be applied per object. If you don't want to see all the accounts of all companies but still want to see all the products of all companies, you can do that.

  • Record rules don't apply to the admin user. You should never use the admin user to record records or operations in a complex instance.

  • Using the multi-company feature should always be a last resort solution because it significantly increases the complexity of your DB. You should only use multi-company if you need to share at least one object among companies, and you have several legal entities requiring several accounting reports. If those 2 conditions are not met, you should not use multi-company.

Avatar
Discard
Author
for my usecase that must be "Account multi-company" I guess
['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
any hint, how that needs to look line in order to achieve my goal?

> user sees only accounts of the CoA of the company the product / supplier / customer bolongs to



Author
honestly your comment "...multi-company feature should always be a last resort solution..." sounds a little scary.
Isn't that one of your core features and users should have trust that this is a good & trustworthy tool?

Sorry, I didn't intend to sound scary. It is not because something is a last resort solution that it is bad. It is a last resort solution because it creates complexity (which is normal because it handles a complex business situation) and you should always look for the simplest solution to a need. It is like starting using analytic accounting instead of trying to find another way to solve a need. Analytic accounting is great, but it's a big addition to your DB if you activate it and start using it. Sometimes it is possible to solve the need with something simpler to use (eg. saved filters on reporting). I can push this reasoning further and say that you should always think twice before installing a module. It obviously doesn't mean that all the modules are bad; it just means that installing a module creates entropy in your DB and if you can solve a need without adding a module, you should seriously consider that solution instead. It is better for all parties involved: easier to learn and use for end-users, easier to implement for partners, easier to maintain for vendor. And what's easy is fast, efficient, cost-effective, and low-risk. Who hasn't met a new Odoo user who wanted to install all the modules and then got overwhelmed; it is a classic mistake. But all this require "functional creativity" which is too many times left aside in favor of entropy (through adding features whether it be custom or not). The true Odoo master is the one who can solve the most needs with as little as possible (an Odoo MacGyver if you wish).

Best Answer

You can set the record rules to separate one element of a company from another company. By applying this record rules, Company A won't see product of Company B.

Avatar
Discard
Author

I still need to see and edit products of all companies. I just wonder whether it is possible to filter out accounts available on the products Form View (accounting section) that does not make sense for a product (because the account does not exist for the company the product belongs to)