orm search() method with product.product, product.template BUG
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Invalid
|
Undecided
|
Dhruti Shastri(OpenERP) |
Bug Description
When I login by non-admin users one record appears four times, on the models used _inherits attribute. (For example: product.product -> inherits: product.template) But when I login by admin records appear fine.
I think the reason is in below code:
base/ir/ir_rule.py : line 137
def domain_get(self, cr, uid, model_name, mode='read', context={}):
dom = self._compute_
if dom:
query = self.pool.
return query.where_clause, query.where_
return [], [], ['"'+self.
When I login "dom" is "None" and so there is dupplicate appearance.
But on other users (limited user) the "dom" gets some value (dom --> list: ['|', ('company_id', '=', False), ('company_id', 'child_of', [1])])
and so query below is constucted.
'SELECT "product_
RESULT : [(1,),(
There is some condition check in tools.misc that is:
if key in self.cache:
In case of admin is logged in this condition is satisfied and works fine but in other cases the record appearance duplicates like in attachment.,
-------
openobject-server -r2799
openobject-addons -r 4152
I'm using Ubuntu 10.04LT and Python2.6
Changed in openobject-addons: | |
assignee: | nobody → DHS(OpenERP) (dhs-openerp) |
Changed in openobject-addons: | |
milestone: | none → 6.0 |
Hello Jacara,
After having done multiple checks unfortunately the problem does not rise up.
Things happen to work quite normal for us.
Would you please update your code and create a new database?
Please re-check and notify us if the problem still persists.
Thank you.