multi company - access violation of res_company
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Expired
|
Undecided
|
Unassigned |
Bug Description
this company rule
[('id',
returns only one record which is correct
I had to apply a workaround,
openerp/osv/orm.py
3436 for sub_ids in cr.split_
3437 if rule_clause:
3438 cr.execute(query, [tuple(sub_ids)] + rule_params)
3439 # FIXME - FGF
3440 # the rules for company does not work for user in sub company having only access to this child, not to the mother
3441 # cr.rowcount returns 1 - which is correct
3442 # len(sub_ids) returns 2 - which is not correct
3443 if cr.rowcount != len(sub_ids) and self._table != 'res_company':
3444 raise except_
3445 _('(A) Operation prohibited by access rules, or performed on an already deleted document (Operation: read, Document type: %s).')
3446 % (self._
affects: | openobject-addons → openobject-server |
Sorry for the delay, but the actual problem is not clear to me, so it is hard to say if the patch is correct or if the record rules need to be fixed. It would be great to have a higher level description of what you are trying to do, and the steps to follow to reproduce it. Thanks!