base/res/partner/partner.py: unconditional use of partner_id in name_get()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
name_get() in partner.py assumes that a res.partner.address will always contain a partner_id. However the field is not set as required and the ondelete method is 'set null'. So it's quite possible for partner_id to be NULL.
I encountered this error when trying to access the Internal Moves tree in Stock Management:
File "/usr/lib/
return f(self, dbname, *args, **kwargs)
File "/usr/lib/
res = pool.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/
names = dict(obj.
File "/usr/lib/
res.
TypeError: 'bool' object is unsubscriptable
r['partner_id'] is False at this point.
Its already fixed in trunk.
Fixed by revision 1921 <email address hidden> for stable.
Thank you.