Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

7

Accessing partners of parent company

By
Nikolaj
on 4/24/13, 7:23 AM 3,409 views

In my multi-company set up the parent company holds all the suppliers and customers. When a user from a child company enters a quotation all the partners are available and can be used, however when returning to edit the quotation the following error is given:

Access Denied The requested operation cannot be completed due to security restrictions. Please contact your system administrator. (Document type: Companies, Operation: read)

When I try to edit a partner, I get the error:

Access Denied The requested operation cannot be completed due to security restrictions. Please contact your system administrator. (Document type: Partner, Operation: read)

From log file:

   2013-04-30 07:27:30,517 1508 ERROR TEST openerp.netsvc: Access Denied
The requested operation cannot be completed due to security restrictions. Please contact your system administrator.

(Document type: Companies, Operation: read)
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/netsvc.py", line 293, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server/openerp/osv/osv.py", line 144, in wrapper
    raise except_osv(inst.name, inst.value)
except_osv: (u'Access Denied', u'The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: Companies, Operation: read)')

I am certain I know what the problem is however I am unsure how to solve it. Basically the user for the child company does not have access to the records in the parent company, so is being denied access. I am not sure which record rule to change here, I do not want to give multi-company access to users, just allow them to read and update the partner records held by the parent company.

Should I be changing the 'Companies' object, or the 'Partner' object?

I already changed the record rule for the partner object (res.partner) to ['|',('company_id.child_ids','child_of',[user.company_id.id]),('name','like','My Company Name')]

I don't really understand the record rules, but I using the trial and error method I think i managed to configure this one for my purpose, it shows all partners and siblings. Still the above question stands, what should I modify to get the access I want?

Edit: My Superadmin user can modify the quotations.

(OE v7 Ubuntu 12.04)

In your customer set up is there anything that is company specific. I presume you have left the company field blank since the child company users can see, but look at all the other fields. Try opening a customer in edit view from the child company - can you edit? I know this works in V6 but I haven't tested in V7

Solnet Solutions Limited, Kevin McMenamin
on 5/1/13, 7:31 PM
0
vanand
On 6/9/14, 7:50 PM

I have the same issue.  All customers must be accessible by all child companies.   When a child company employee creates a customer then the customer is automatically assigned to that child company.  If I remove the data in company field of customer then I can't access the customer from a user assigned to child company.  I get a similar error mentioed above but stating that the user has read only access to the account.  Any pointer will be greatly apprecated...thanks

0
divya
On 10/6/14, 5:08 AM

 Is there any update regarding this issue even i got same problem cannot proceed  futher assistance, please tell me the solution for this issue. 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

4 follower(s)

Stats

Asked: 4/24/13, 7:23 AM
Seen: 3409 times
Last updated: 3/16/15, 8:10 AM