Help

2

Share products between multi companies

Avatar
Pascal Tremblay

I tried at least with 10 new installations to create this multi companies situation.

I'm on Odoo version 8.0.2

I followed all the tutorials I have found. It doesn't work.


Here is the situation :

+ Company's Structure
      - Main company
            - ciesub1
                  - ciesub1.1

+ Users
      - Admin (Main company, Allowed Companies : Main Company)
      - sub1user (ciesub1, Allowed Companies : ciesub1)

+ Products
      - productmain (company_id = Main company)
      - product1 (company_id = ciesub1)
      - product1.1 (company_id = ciesub1.1)
      - productglobal (company_id = null )


+ In Sales -> Products -> Products :
      - Admin user can see ALL 4 products; (good, normal)
      - sub1user can only see productglobal and product1. (??????????????????)
     
     
Questions / comments

      - Why does subuser1 not see products from Main company? (I have read that it should see it, but I CAN'T reproduce it.)
      - Why does subuser1 not see products from his child company ciesub1.1? (Mysterious thing!)
      - Is this a bug?


      (3 days on this problem... hope you could help me)


Thanks for your attention

Some screenshot for gift to you :

 

Avatar
Discard
1 Answer
2
Avatar
Pascal Tremblay
Best Answer

Our problem is resolved! YES! and REYES!

In Settings -> Technical -> Security -> Record Rules -> Product multi-company , the default rule was wrong. So we change :

 

['|',('company_id','=',user.company_id.id),('company_id','=',False)]

for :
['|','|',('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id]),('company_id','=',False)]

3 Comments
Avatar
Discard
Avatar
Jeff Beidler
-

Sounds like something that should be fixed. Did you submit a bug report?

Avatar
Pascal Tremblay
-

I don't know how to make it.

Avatar
Jeff Beidler
-

The issue queue is here, unless they have more than one: https://github.com/odoo/odoo/issues