From 3c7740fd4bd51c50ce39d4ead90bc07eb62f0950 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Thu, 7 Jun 2012 10:28:19 +0530 Subject: [PATCH] [IMP] account_voucher : Improved the code. bzr revid: mdi@tinyerp.com-20120607045819-aj6y5ps6tq7khkvf --- addons/account_voucher/account_voucher.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 3fa83c5eec6..11842c91296 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -262,13 +262,13 @@ class account_voucher(osv.osv): return type_dict.get(type, 'Voucher') def create(self, cr, uid, vals, context=None): - res = super(account_voucher, self).create(cr, uid, vals, context) + res = super(account_voucher, self).create(cr, uid, vals, context=context) self.create_send_note(cr, uid, [res], context=context) return res def create_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): - self.message_append_note(cr, uid, [obj.id],body=_("%s created.") % (self._get_document_type(obj.type)), context=context) + self.message_append_note(cr, uid, [obj.id], body=_("%s created.") % (self._get_document_type(obj.type)), context=context) def reconcile_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): @@ -807,7 +807,6 @@ class account_voucher(osv.osv): def proforma_voucher(self, cr, uid, ids, context=None): self.action_move_line_create(cr, uid, ids, context=context) - self.posted_send_note(cr, uid, ids, context=context) return {'type': 'ir.actions.act_window_close'} def action_cancel_draft(self, cr, uid, ids, context=None):