From 23a57fc7f45d0e2377a758d298e83a3818b66fcb Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Tue, 15 Jun 2010 10:54:29 +0530 Subject: [PATCH] [REVERT] account: log message put wrong place bzr revid: hmo@tinyerp.com-20100615052429-ki2knnkrhpqks3bg --- addons/account/invoice.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index b15b4e94ad6..cf0a6760481 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -863,6 +863,7 @@ class account_invoice(osv.osv): # make the invoice point to that move self.write(cr, uid, [inv.id], {'move_id': move_id,'period_id':period_id, 'move_name':new_move_name}) self.pool.get('account.move').post(cr, uid, [move_id]) + self._log_event(cr, uid, ids) return True def line_get_convert(self, cr, uid, x, part, date, context=None): @@ -916,7 +917,6 @@ class account_invoice(osv.osv): 'WHERE account_move_line.move_id = %s ' \ 'AND account_analytic_line.move_id = account_move_line.id', (ref, move_id)) - self._log_event(cr, uid, ids) return True def action_cancel(self, cr, uid, ids, *args): @@ -952,17 +952,7 @@ class account_invoice(osv.osv): return taxes.values() def _log_event(self, cr, uid, ids, factor=1.0, name='Open Invoice'): - for (invoice_id,number) in self.name_get(cr, uid, ids): - invoice = self.browse(cr,uid,invoice_id) - message = ("%s %s %s %s %s %s %s") % ( - _('Invoice'), - _("INV/"), - number.split('/')[-1], - _("Opened,"), - _('journal entries'), - invoice.move_id.name, - _("Created")) - self.log(cr, uid, invoice_id, message) + #TODO: implement messages system return True def name_get(self, cr, uid, ids, context=None):