Browse Source

FIX when partner_contact_birthdate and partner_relations are installaed together, get

AccessError: ('AccessError', 'No value found for res.partner(43,).birthdate_date')
See https://github.com/OCA/partner-contact/issues/154
pull/200/head
eLBati 9 years ago
parent
commit
995ab2cc1a
  1. 11
      partner_relations/model/res_partner.py

11
partner_relations/model/res_partner.py

@ -298,12 +298,11 @@ class ResPartner(models.Model):
cr, uid, args + date_args + active_args, offset=offset, cr, uid, args + date_args + active_args, offset=offset,
limit=limit, order=order, context=context, count=count) limit=limit, order=order, context=context, count=count)
def read(
self, cr, uid, ids, fields=None, context=None,
load='_classic_read'):
return super(ResPartner, self).read(
cr, uid, ids, fields=fields,
context=self._update_context(context, ids), load=load)
@api.multi
def read(self, fields=None, load='_classic_read'):
self.env.context = self._update_context(
self.env.context, [r.id for r in self])
return super(ResPartner, self).read(fields=fields, load=load)
def write(self, cr, uid, ids, vals, context=None): def write(self, cr, uid, ids, vals, context=None):
return super(ResPartner, self).write( return super(ResPartner, self).write(

Loading…
Cancel
Save