← Back to team overview

openerp-community team mailing list archive

Portal partner rule bug

 

This bug is related with search on model res.partner when the module portal
is installed because of an ir.rule of res.partner in that module security
Suppose that there is an extension of res.partner that add one or more
many2one fields to res.users, and those users have their own partner, I
mean that they are not users of this parent, just relations to express
business. If you want to do search over those res.users relation fields
that involve the res.partner model, ex:
[('partner_id.user_urgency_id', '=', uid)]
then this domain or search that use this domain will not work properly due
to the ir.rule of portal module that adds checks to the domain that cannot
let you find the correct values. I my case I don't see anything as results.
The ir.rule of portal module portal_read_own_res_partner, have the
domain_force:
[('user_ids', 'in', user.id)]
To make all work like this rule tell your new many2one relations in
res.partner yould be expressed as user_ids of res.partner, that means that
those users cannot have another partner, they are users of this partner,
and that is not the case.
All works ok when the rule is disabled or deleted to not apply anymore on
res.partner.

Is this rule important for something more that Im missing?

Cheers

Follow ups