Comments (3)
why company_id is not a related on company_ids ? (is it possible ?!)
It's not possible and has no sens. Which company can we use if the user has access to a lot of them?
And, why in the case there is many companies define on the product, company_id is set with the first value ?
IMO, the company_id should be empty and never used once this module is installed otherwise we will encounter bugs. (IMO it's a bug)
Last question, why record rules is set with in and not child_of ?
IMO to be consistent with others multi company record rules, we should use child_of
from multi-company.
company_id
is an standard Odoo field, so we should keep a value in it for possible modules that tries to acces that field. I decided to use the first record of the allowed companies. I could put a related field, because Odoo makes the same behaviour when relating a many2many in a many2one field, but I preferred to use a computed method that can be inherited is someone has another need/requirement instead of using the first record. The same applies to be empty instead of this. Any of the behaviors seems good for me.
About the record rule, I say no. This is put this way intentionally, because we will lose functionality using child_of
operator. What if we want to give permission to the parent company and only one of the child ones? As this is a many2many, you can select all the companies you want. If you want to mimic the child_of behavior, select the parent and all of the children companies in it.
from multi-company.
Thank you for your answers.
from multi-company.
Related Issues (20)
- Odoo v15 mail_multi_company & mail_template_multi_company HOT 2
- It changes automatically the company after sale order confirm HOT 1
- Migration to version 16.0 HOT 12
- [14.0][ADD] purchase_sale_inter_company: Transfer all attribute and attriute values from PO to SO HOT 1
- Multi company email domain + signatures: New module available HOT 4
- multi_company_product reinstall issu HOT 1
- Multi Company Partner Performance HOT 2
- post_init_hook in partner_multi_company need to consider allowed companies of users.
- multicurrency error in payment for another company HOT 1
- [BUG][14.0] `partner_multi_company` removes partner_share from res.partner ir.rule HOT 1
- [14.0] mail_template_multi_company: User of non-default company cannot send mails of subsequently installed modules HOT 1
- Double negation HOT 1
- partner_multi_company restores wrong ir.rule
- [QUESTION] A couple of questions about some parts of code HOT 1
- The Inter-Company tab not getting showed HOT 2
- Migration to version 17.0 HOT 8
- [16.0] Error in Domain Regardless of company_ids Field State HOT 1
- [PROBLEM] Migration from v15 to v16 HOT 2
- Lack of connection to base_multi_company post_init_hook in partner_multi_company and product_multi_company modules in version 16 HOT 1
- Multi-company product variant access error HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from multi-company.