diff options
| author | Christophe Matthieu <chm@openerp.com> | 2013-05-06 15:56:53 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2013-05-06 15:56:53 +0200 |
| commit | 9ed71ecf762164c1bdf5a6a2ee16cf1b93ba29dd (patch) | |
| tree | 3508194974c3c6189f2deb0c4f033c59dabfd1f2 | |
| parent | da8670411a0e19ba2c8d0e231afea5a0d3a1aa45 (diff) | |
| parent | 356d18a097ca979a0f7592a6cdb2845f97bdd75d (diff) | |
[FIX] Remove invite email when validating an invoice. Fixed in 7 but lost when merging into trunk/saas.
bzr revid: chm@openerp.com-20130506135653-7e8nukr68s9255oq
| -rw-r--r-- | addons/portal_sale/portal_sale.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/addons/portal_sale/portal_sale.py b/addons/portal_sale/portal_sale.py index cd3b702d3c5..07300c5d463 100644 --- a/addons/portal_sale/portal_sale.py +++ b/addons/portal_sale/portal_sale.py @@ -104,25 +104,6 @@ class account_invoice(osv.Model): pass return action_dict - def invoice_validate(self, cr, uid, ids, context=None): - # fetch the partner's id and subscribe the partner to the invoice - document = self.browse(cr, uid, ids[0], context=context) - partner = document.partner_id - # TDE note: this code should be improved: used a real invite wizard instead of an ugly email - if partner.id not in document.message_follower_ids: - self.message_subscribe(cr, uid, ids, [partner.id], context=context) - mail_values = { - 'recipient_ids': [(4, partner.id)], - 'subject': 'Invitation to follow %s' % document.name_get()[0][1], - 'body_html': 'You have been invited to follow %s' % document.name_get()[0][1], - 'auto_delete': True, - 'type': 'email', - } - mail_obj = self.pool.get('mail.mail') - mail_id = mail_obj.create(cr, uid, mail_values, context=context) - mail_obj.send(cr, uid, [mail_id], context=context) - return super(account_invoice, self).invoice_validate(cr, uid, ids, context=context) - def get_signup_url(self, cr, uid, ids, context=None): assert len(ids) == 1 document = self.browse(cr, uid, ids[0], context=context) |
