From 299246e2aec867cc90f56caaefad6c99d8f2f31f Mon Sep 17 00:00:00 2001 From: Christophe Combelles Date: Thu, 10 Jul 2014 00:22:21 +0300 Subject: [PATCH] [FIX] account: using wizard methods instead of invoice methods Typo during port of account.invoice to new API. (Rebase of 02a36b6 for #1052) --- addons/account/account_invoice.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 455feb14afb..9314b1c3715 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -145,7 +145,7 @@ class account_invoice(models.Model): else: self.residual = new_value # prevent the residual amount on the invoice to be less than 0 - self.residual = max(self.residual, 0.0) + self.residual = max(self.residual, 0.0) @api.one @api.depends( @@ -1619,8 +1619,8 @@ class mail_compose_message(models.Model): context.get('default_res_id') and context.get('mark_invoice_as_sent'): invoice = self.env['account.invoice'].browse(context['default_res_id']) invoice = invoice.with_context(mail_post_autofollow=True) - self.write({'sent': True}) - self.message_post(body=_("Invoice sent")) + invoice.write({'sent': True}) + invoice.message_post(body=_("Invoice sent")) return super(mail_compose_message, self).send_mail() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: