From 75ee662647d0209516997bdce7bed23afa1c32af Mon Sep 17 00:00:00 2001 From: Niels Huylebroeck Date: Fri, 25 Jan 2013 17:07:11 +0100 Subject: [PATCH 1/3] [FIX] account_payment: imported payments from invoices on payment order do not reflect the reference type of the invoice lp bug: https://launchpad.net/bugs/1105067 fixed bzr revid: nh@agaplan.eu-20130125160711-cofis6ftzw3zvcza --- addons/account_payment/wizard/account_payment_order.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py index 455475b0ae5..60b1bc9c1d1 100644 --- a/addons/account_payment/wizard/account_payment_order.py +++ b/addons/account_payment/wizard/account_payment_order.py @@ -88,6 +88,7 @@ class payment_order_create(osv.osv_memory): 'partner_id': line.partner_id and line.partner_id.id or False, 'communication': line.ref or '/', 'date': date_to_pay, + 'state': line.invoice and line.invoice.reference_type != 'none' and 'structured' or 'normal', 'currency': (line.invoice and line.invoice.currency_id.id) or line.journal_id.currency.id or line.journal_id.company_id.currency_id.id, }, context=context) return {'type': 'ir.actions.act_window_close'} From 2ace4972e671934526ad9f501e22d570ab3d062f Mon Sep 17 00:00:00 2001 From: Peter Langenberg Date: Tue, 29 Jan 2013 15:34:28 +0100 Subject: [PATCH 2/3] [FIX]l10n_be_coda Agaplan 661 OpenERP Maintenance bzr revid: pl@agaplan.eu-20130129143428-l74j4vzt8z8j6ebr --- addons/l10n_be_coda/wizard/account_coda_import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_be_coda/wizard/account_coda_import.py b/addons/l10n_be_coda/wizard/account_coda_import.py index 213040d6204..78d3dbcc545 100644 --- a/addons/l10n_be_coda/wizard/account_coda_import.py +++ b/addons/l10n_be_coda/wizard/account_coda_import.py @@ -246,7 +246,7 @@ class account_coda_import(osv.osv_memory): elif line[0] == '9': statement['balanceMin'] = float(rmspaces(line[22:37])) / 1000 statement['balancePlus'] = float(rmspaces(line[37:52])) / 1000 - if not statement['balance_end_real']: + if not statement.get('balance_end_real'): statement['balance_end_real'] = statement['balance_start'] + statement['balancePlus'] - statement['balanceMin'] for i, statement in enumerate(statements): statement['coda_note'] = '' From de240e28183be881078af89893b504fc6478051a Mon Sep 17 00:00:00 2001 From: Peter Langenberg Date: Thu, 14 Feb 2013 13:58:41 +0100 Subject: [PATCH 3/3] [fix]l10n_be_coda/wizard/account_coda_import.py warning No transactions or no period in coda file ! to avoid key error lp bug: https://launchpad.net/bugs/1125165 fixed bzr revid: pl@agaplan.eu-20130214125841-ytdwspwug910v1hv --- addons/l10n_be_coda/wizard/account_coda_import.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/l10n_be_coda/wizard/account_coda_import.py b/addons/l10n_be_coda/wizard/account_coda_import.py index 78d3dbcc545..b952ee5d0f6 100644 --- a/addons/l10n_be_coda/wizard/account_coda_import.py +++ b/addons/l10n_be_coda/wizard/account_coda_import.py @@ -264,6 +264,8 @@ class account_coda_import(osv.osv_memory): raise osv.except_osv(_('Error'), _("Configuration Error in journal %s!\nPlease verify the Default Debit and Credit Account settings.") % statement['journal_id'].name) if balance_start_check != statement['balance_start']: statement['coda_note'] = _("The CODA Statement %s Starting Balance (%.2f) does not correspond with the previous Closing Balance (%.2f) in journal %s!") % (statement['description'] + ' #' + statement['paperSeqNumber'], statement['balance_start'], balance_start_check, statement['journal_id'].name) + if not(statement.get('period_id')): + raise osv.except_osv(_('Error') + ' R3006', _(' No transactions or no period in coda file !')) data = { 'name': statement['paperSeqNumber'], 'date': statement['date'],