From 67a37d807ce3d19a5a1270ddabbc1f05e35b921d Mon Sep 17 00:00:00 2001 From: "Purnendu Singh (OpenERP)" Date: Tue, 8 May 2012 14:15:49 +0530 Subject: [PATCH] [IMP] account: improve msg formatting and revert the changes for due date calculation bzr revid: psi@tinyerp.com-20120508084549-3wd5dcnla6lgvvsy --- addons/account/account_invoice.py | 6 ------ addons/account/company.py | 10 +++++----- addons/account/report/account_print_overdue.rml | 5 +++-- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index d8014fbdb02..d0f7579a86e 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -469,16 +469,10 @@ class account_invoice(osv.osv): def onchange_payment_term_date_invoice(self, cr, uid, ids, payment_term_id, date_invoice): res = {} if not payment_term_id: - if date_invoice: - res = {'value':{'date_due': date_invoice}} - else: - res = {'value':{'date_due': time.strftime('%Y-%m-%d')}} return res if not date_invoice: date_invoice = time.strftime('%Y-%m-%d') - pterm_list = self.pool.get('account.payment.term').compute(cr, uid, payment_term_id, value=1, date_ref=date_invoice) - if pterm_list: pterm_list = [line[0] for line in pterm_list] pterm_list.sort() diff --git a/addons/account/company.py b/addons/account/company.py index bbe3570f13a..0601b24a7a8 100644 --- a/addons/account/company.py +++ b/addons/account/company.py @@ -39,11 +39,11 @@ class res_company(osv.osv): _defaults = { 'expects_chart_of_accounts': True, - 'overdue_msg': '''Our records indicate that the payments on your account are still due. Please find details below. - If the amount has already been paid, please disregard this notice. Otherwise, please forward us - the total amount stated below. If you have any queries regarding your account, Please contact us. - \nThank you in advance for your cooperation. -''' + 'overdue_msg': '''Our records indicate that the payments on your account are still due. Please find details below.\n + \nIf the amount has already been paid, please disregard this notice. + \nOtherwise, please forward us the total amount stated below. + \nIf you have any queries regarding your account, Please contact us. + \nThank you in advance for your cooperation.''' } res_company() diff --git a/addons/account/report/account_print_overdue.rml b/addons/account/report/account_print_overdue.rml index 0b10a0c8be4..dbc9c76243d 100644 --- a/addons/account/report/account_print_overdue.rml +++ b/addons/account/report/account_print_overdue.rml @@ -83,6 +83,7 @@ + @@ -157,7 +158,7 @@ - [[ not getLines(o) and removeParentNode('para') or message(o, company) ]] + [[ not getLines(o) and removeParentNode('para') or message(o, company) ]] @@ -165,7 +166,7 @@ - [[ not getLines(o) and removeParentNode('para') or 'Best regards.']] + [[ not getLines(o) and removeParentNode('para') or 'Best regards,']]