diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 423c39deea1..fe2c3d56b1d 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -891,7 +891,11 @@ 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]) + message = _('Invoice ') + " '" + inv.name + "' "+ _("is confirm") + self.log(cr, uid, inv.id, message) + self._log_event(cr, uid, ids) + return True def line_get_convert(self, cr, uid, x, part, date, context=None): diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py index fa0ecf07786..7f74553f6bf 100644 --- a/addons/account_voucher/voucher.py +++ b/addons/account_voucher/voucher.py @@ -366,6 +366,10 @@ class account_voucher(osv.osv): 'move_id': move_id, 'move_ids':[(6, 0,line_ids)] } + + message = _('Voucher ') + " '" + inv.name + "' "+ _("is confirm") + self.log(cr, uid, inv.id, message) + self.write(cr, uid, [inv.id], rec) return True diff --git a/addons/account_voucher_payment/account_voucher_payment.py b/addons/account_voucher_payment/account_voucher_payment.py index 66ee2c75ce1..38c8bf93f4a 100755 --- a/addons/account_voucher_payment/account_voucher_payment.py +++ b/addons/account_voucher_payment/account_voucher_payment.py @@ -102,6 +102,7 @@ class account_voucher(osv.osv): line_ids = [] line_ids += [move_line_pool.create(cr, uid, move_line)] + rec_ids = [] for line in inv.payment_ids: amount=0.0 move_line = { @@ -147,16 +148,23 @@ class account_voucher(osv.osv): line_ids += [move_line_id] if line.invoice_id: - rec_ids = [move_line_id] + rec_ids += [move_line_id] for move_line in line.invoice_id.move_id.line_id: if line.account_id.id == move_line.account_id.id: rec_ids += [move_line.id] - move_line_pool.reconcile_partial(cr, uid, rec_ids) + #move_line_pool.reconcile_partial(cr, uid, rec_ids) + + if rec_ids: + move_line_pool.reconcile_partial(cr, uid, rec_ids) rec = { 'move_id': move_id, 'move_ids':[(6, 0,line_ids)] } + + message = _('Voucher ') + " '" + inv.name + "' "+ _("is confirm") + self.log(cr, uid, inv.id, message) + self.write(cr, uid, [inv.id], rec) return True