Skip to content

Commit

Permalink
[FIX] account: using wizard methods instead of invoice methods
Browse files Browse the repository at this point in the history
Typo during port of account.invoice to new API.

(Rebase of 02a36b6 for odoo#1052)
  • Loading branch information
ccomb authored and odony committed Jul 22, 2014
1 parent d9339e1 commit 299246e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addons/account/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def _compute_residual(self):
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(
Expand Down Expand Up @@ -1619,8 +1619,8 @@ def send_mail(self):
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:

0 comments on commit 299246e

Please sign in to comment.