subscription and multicompany not working well together
Hi,
I am using Openerp 6.1 with support for multicompany, as we need to manage two companies from the same openerp instance. However, when I try to use the subcriptions module for recurring invoices, I get the following error.
As a first step, I go to Tools -> Configuration -> Recurring Events -> Document Types and try to create a document type for invoices. I set name='invoices' and Object = 'Invoice', then save, getting the following error message:
OpenERP Server Error
Client Traceback (most recent call last):
File "/usr/lib/
response[
File "/usr/lib/
return self.do_get(req, model, ids, fields)
File "/usr/lib/
records = Model.read(ids, fields, req.session.
File "/usr/lib/
args, kw)
File "/usr/lib/
result = self.connector.
File "/usr/lib/
raise xmlrpclib.
Server Traceback (most recent call last):
File "/usr/lib/
return openerp.
File "/usr/lib/
result = ExportService.
File "/usr/lib/
res = fn(db, uid, *params)
File "/usr/lib/
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/usr/lib/
return f(self, dbname, *args, **kwargs)
File "/usr/lib/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/lib/
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/lib/
result = self._read_flat(cr, user, select, fields, context, load)
File "/usr/lib/
res2 = self._columns[
File "/usr/lib/
ids2 = obj.pool.
File "/usr/lib/
return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
File "/usr/lib/
self.
File "/usr/lib/
apply_
File "/usr/lib/
query = self.pool.
File "/usr/lib/
e = expression.
File "/usr/lib/
self.parse(cr, uid, distribute_
File "/usr/lib/
raise ValueError("Invalid field %r in domain expression %r" % (left, exp))
ValueError: Invalid field 'company_id' in domain expression ['|', ('company_id', '=', False), ('company_id', 'child_of', [2])]
I tried the same as a superadmin user, and it works, but i'm afraid of generating all our recurring documents this way. If this is not a bug, but a misunderstanding on my side of permissions / security, I apologize in advance. But the error message seems to me that the company_id is not taken into account in the subscription module.
Thanks,
Derek
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Serpent Consulting Services
- Solved:
- 2013-09-06
- Last query:
- 2013-09-06
- Last reply:
- 2013-09-06
This question was originally filed as bug #1220664.
Hello,
I have checked this issue ,but this issue is working fine as also with multi company and subscription. SO, would you please check your configurations again and correct me if I did any wrong steps.
Thanks & waiting for your answer.
Derek,
This is more like a config issue.
I could only reproduce when I gave multicompany access to subcription models via the medium of record rules.
We cannot do this as they do not have the company_id field.
Kindly disable/remove the record rules of these models for multicompany (if you have made).
This will surely help.
Thanks.
derekhl (derekhl) said : | #3 |
Hi,
Thank you very much! Indeed that was the problem, removing the record rule allowed us to create Document Type, and periodic docuements, which seem to be working perfectly now. Sorry I reported this as a bug originally.
Greetings,
Derek
derekhl (derekhl) said : | #4 |
Thanks Serpent Consulting Services, that solved my question.
Welcome Derek.
This should help you : http://
Thanks.