[IMP] Simple responsible change message
bzr revid: jco@openerp.com-20130121095426-0r0y92trm23bef28
This commit is contained in:
parent
0f5eceb07b
commit
4b2d2b8ccf
|
@ -276,13 +276,14 @@ class res_partner(osv.osv):
|
|||
<center>Amount due: %s </center>''' % (total)
|
||||
return followup_table
|
||||
|
||||
# def write(self, cr, uid, ids, vals, context=None):
|
||||
# if vals.get("payment_responsible_id", False):
|
||||
# for part in self.browse(cr, uid, ids, context=context):
|
||||
# if part.payment_responsible_id <> vals["payment_responsible_id"]:
|
||||
# self.message_post(cr, uid, part.id, body = _('New responsible registered: %s'), context=context)
|
||||
# res = super(res_partner, self).write(cr, uid, ids, vals, context=context)
|
||||
# return res
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if vals.get("payment_responsible_id", False):
|
||||
for part in self.browse(cr, uid, ids, context=context):
|
||||
if part.payment_responsible_id <> vals["payment_responsible_id"]:
|
||||
self.message_post(cr, uid, part.id, body = _('New responsible registered: %s') % (self.pool.get("res.users").browse(cr, uid, vals["payment_responsible_id"], context=context).name),
|
||||
context=context)
|
||||
res = super(res_partner, self).write(cr, uid, ids, vals, context=context)
|
||||
return res
|
||||
|
||||
def action_done(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'payment_next_action_date': False, 'payment_next_action':'', 'payment_responsible_id': False, 'payment_no_email': False}, context=context)
|
||||
|
|
Loading…
Reference in New Issue