From de3513e602a17ebbadd59801320091c312e9ece7 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Wed, 8 Aug 2012 12:14:19 +0200 Subject: [PATCH 1/5] [FIX] account: reload already printed invoices that are stored as attachment instead of generating the report again bzr revid: qdp-launchpad@openerp.com-20120808101419-bd1hmpp3nv7byp2o --- addons/account/account_report.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account/account_report.xml b/addons/account/account_report.xml index 7b574c8960e..d258bb0b140 100644 --- a/addons/account/account_report.xml +++ b/addons/account/account_report.xml @@ -20,6 +20,7 @@ rml="account/report/account_print_invoice.rml" string="Invoices" attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')" + attachment_use="True" usage="default" /> From 7aa06aca92f2ae4216e2e3cfe9174d69ee639295 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Wed, 8 Aug 2012 12:17:49 +0200 Subject: [PATCH 2/5] [IMP] account_voucher: better description labels for yaml test bzr revid: qdp-launchpad@openerp.com-20120808101749-y7mxgsbpzxrl7bd0 --- addons/account_voucher/test/case1_usd_usd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_voucher/test/case1_usd_usd.yml b/addons/account_voucher/test/case1_usd_usd.yml index 5ff48e7d35d..d8ac932a055 100644 --- a/addons/account_voucher/test/case1_usd_usd.yml +++ b/addons/account_voucher/test/case1_usd_usd.yml @@ -141,7 +141,7 @@ !context 'type': 'receipt' - - I create the first voucher of payment with values 240 USD, journal USD, + On the first March, I create the first voucher of payment with values 240 USD, journal USD, - !record {model: account.voucher, id: account_voucher_1_case1, view: view_vendor_receipt_form}: account_id: account.cash @@ -235,7 +235,7 @@ move_line = move_line_obj.browse(cr, uid, move_lines[0]) assert (move_line.amount_residual_currency == 30.0) , "Residual amount is not correct for first Invoice" - - I create the second voucher of payment with values 45 USD, journal USD, + On the first April, I create the second voucher of payment with values 45 USD, journal USD, - !record {model: account.voucher, id: account_voucher_2_case1}: account_id: account.cash From f58ef68d4de5d955694120c2cf846763ef2463b8 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 9 Aug 2012 14:01:34 +0200 Subject: [PATCH 3/5] [REV] reverted previous commit (4314) that removes footer field on res.partner.bank, because specs changed bzr revid: qdp-launchpad@openerp.com-20120809120134-mx2nfg8k4xn7yfms --- openerp/addons/base/res/res_bank.py | 2 ++ openerp/addons/base/res/res_bank_view.xml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_bank.py b/openerp/addons/base/res/res_bank.py index 07719962866..c5c05c1807c 100644 --- a/openerp/addons/base/res/res_bank.py +++ b/openerp/addons/base/res/res_bank.py @@ -139,6 +139,7 @@ class res_partner_bank(osv.osv): 'state': fields.selection(_bank_type_get, 'Bank Account Type', required=True, change_default=True), 'sequence': fields.integer('Sequence'), + 'footer': fields.boolean("Display on Reports", help="Display this bank account on the footer of printed documents like invoices and sales orders.") } _defaults = { @@ -211,6 +212,7 @@ class res_partner_bank(osv.osv): if c.partner_id: r = self.onchange_partner_id(cr, uid, ids, c.partner_id.id, context=context) r['value']['partner_id'] = c.partner_id.id + r['value']['footer'] = 1 result = r return result diff --git a/openerp/addons/base/res/res_bank_view.xml b/openerp/addons/base/res/res_bank_view.xml index 96317df0068..4409f23a501 100644 --- a/openerp/addons/base/res/res_bank_view.xml +++ b/openerp/addons/base/res/res_bank_view.xml @@ -97,6 +97,7 @@ + @@ -133,6 +134,7 @@ + @@ -155,7 +157,7 @@ res.partner.bank form tree,form - Configure your company's bank accounts. You can reorder bank accounts from the list view. If you use the accounting application of OpenERP, journals and accounts will be created automatically based on these data. + Configure your company's bank accounts and select those that must appear on the report footer. You can reorder bank accounts from the list view. If you use the accounting application of OpenERP, journals and accounts will be created automatically based on these data. Date: Thu, 9 Aug 2012 14:04:09 +0200 Subject: [PATCH 4/5] [REV] reverted previous commit (7212) that removes footer field on res.partner.bank, because specs changed bzr revid: qdp-launchpad@openerp.com-20120809120409-lmubwp2k7wig83hz --- addons/account/account_bank_view.xml | 3 +++ addons/account/res_config.py | 3 +++ addons/account/res_config_view.xml | 2 ++ addons/account/test/account_customer_invoice.yml | 1 + addons/edi/models/res_company.py | 7 +++++++ 5 files changed, 16 insertions(+) diff --git a/addons/account/account_bank_view.xml b/addons/account/account_bank_view.xml index 388a8e5a64b..4b3436c8a51 100644 --- a/addons/account/account_bank_view.xml +++ b/addons/account/account_bank_view.xml @@ -45,6 +45,9 @@

Click to setup a new bank account. +

+ Configure your company's bank account and select those that must + appear on the report footer.

If you use the accounting application of OpenERP, journals and accounts will be created automatically based on these data. diff --git a/addons/account/res_config.py b/addons/account/res_config.py index 8e50493b063..658f87962ff 100644 --- a/addons/account/res_config.py +++ b/addons/account/res_config.py @@ -43,6 +43,8 @@ class account_config_settings(osv.osv_memory): string='Default company currency', help="Main currency of the company."), 'paypal_account': fields.related('company_id', 'paypal_account', type='char', size=128, string='Paypal account', help="Paypal account (email) for receiving online payments (credit card, etc.) If you set a paypal account, the customer will be able to pay your invoices or quotations with a button \"Pay with Paypal\" in automated emails or through the OpenERP portal."), + 'company_footer': fields.related('company_id', 'rml_footer2', type='char', size=250, readonly=True, + string='Bank accounts on reports will display as followed', help="Bank accounts as printed in the footer of each customer document. This is for information purpose only, you should configure these bank accounts through the above button \"Configure Bank Accounts\"."), 'has_chart_of_accounts': fields.boolean('Company has a chart of accounts'), 'chart_template_id': fields.many2one('account.chart.template', 'Template', domain="[('visible','=', True)]"), @@ -152,6 +154,7 @@ class account_config_settings(osv.osv_memory): 'expects_chart_of_accounts': company.expects_chart_of_accounts, 'currency_id': company.currency_id.id, 'paypal_account': company.paypal_account, + 'company_footer': company.rml_footer2, 'has_chart_of_accounts': has_chart_of_accounts, 'has_fiscal_year': bool(fiscalyear_count), 'chart_template_id': False, diff --git a/addons/account/res_config_view.xml b/addons/account/res_config_view.xml index 2cdeb8e0ea9..ebcd99a6915 100644 --- a/addons/account/res_config_view.xml +++ b/addons/account/res_config_view.xml @@ -225,6 +225,8 @@ icon="gtk-go-forward" type="action" class="oe_inline oe_link"/> +