不同类型未触发的更改
On change not triggered with different type
我覆盖了 onchange_partner_id,如果我创建与类型 "contact" 的联系,它会完美地工作,但如果我选择类型 "delivery address",则不会触发 onchange ..为什么会这样,我怎么能修理它?
def onchange_parent_id(self, cr, uid, ids, parent_id, context=None):
res = super(ResPartner, self).onchange_parent_id(cr, uid, ids, parent_id, context=context)
new_contact_obj = self.browse(cr,uid,ids,context=context)
parent_obj = self.browse(cr,uid, parent_id,context=context)
if not new_contact_obj.multiply_pricelists_ids:
new_contact_obj.multiply_pricelists_ids = parent_obj.multiply_pricelists_ids
return res
可能是因为这个检查:
我认为由于这种情况,onchange 发生了,但是 returns 没有来自父级的值。
我覆盖了 onchange_partner_id,如果我创建与类型 "contact" 的联系,它会完美地工作,但如果我选择类型 "delivery address",则不会触发 onchange ..为什么会这样,我怎么能修理它?
def onchange_parent_id(self, cr, uid, ids, parent_id, context=None):
res = super(ResPartner, self).onchange_parent_id(cr, uid, ids, parent_id, context=context)
new_contact_obj = self.browse(cr,uid,ids,context=context)
parent_obj = self.browse(cr,uid, parent_id,context=context)
if not new_contact_obj.multiply_pricelists_ids:
new_contact_obj.multiply_pricelists_ids = parent_obj.multiply_pricelists_ids
return res
可能是因为这个检查:
我认为由于这种情况,onchange 发生了,但是 returns 没有来自父级的值。