diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 16ea52b65d4..93d5c37bd08 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -716,8 +716,6 @@ class account_move_line(osv.osv): account_id = line['account_id']['id'] partner_id = (line['partner_id'] and line['partner_id']['id']) or False writeoff = debit - credit - if 'write_off' in context and context['write_off']['writeoff_amount']: - writeoff = context['write_off']['writeoff_amount'] # Ifdate_p in context => take this date if context.has_key('date_p') and context['date_p']: diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 509f6b00b92..f902810ac31 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -694,10 +694,6 @@ class account_voucher(osv.osv): if line.move_line_id.id: rec_ids = [master_line, line.move_line_id.id] rec_list_ids.append(rec_ids) - writeoff_account_id = False - writeoff_journal_id = False - writeoff_period_id = inv.period_id.id, - comment = False if not currency_pool.is_zero(cr, uid, inv.currency_id, line_total): diff = line_total @@ -722,19 +718,6 @@ class account_voucher(osv.osv): move_line_pool.create(cr, uid, move_line) - voucher = self.browse(cr, uid, ids)[0] - - for rec_ids in rec_list_ids: - if len(rec_ids) >= 2: - for line in voucher.line_ids: - if line.amount_unreconciled != line.amount: - if 'write_off' in context and context['write_off']['writeoff_acc_id']: - writeoff_account_id = context['write_off']['writeoff_acc_id'] - writeoff_journal_id = context['write_off']['writeoff_journal_id'] - comment = context['write_off']['comment'] - self.pool.get('account.move.line').reconcile(cr, uid, rec_ids, 'manual', writeoff_account_id, writeoff_period_id, writeoff_journal_id, context) - else: - self.pool.get('account.move.line').reconcile_partial(cr, uid, rec_ids, 'manual', context) self.write(cr, uid, [inv.id], { 'move_id': move_id, 'state': 'posted',