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