[REVERT] account: log message put wrong place

bzr revid: hmo@tinyerp.com-20100615052429-ki2knnkrhpqks3bg
This commit is contained in:
Harry (OpenERP)
2010-06-15 10:54:29 +05:30
parent d0da755878
commit 23a57fc7f4
+2 -12
View File
@@ -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):