From 3403fa9347e6b5b8d3ade606414410eaf878cba0 Mon Sep 17 00:00:00 2001 From: bch <> Date: Thu, 18 Jan 2007 10:18:51 +0000 Subject: [PATCH] L10N_CH : DTA rjust modified for compatibility with python2.3 bzr revid: bch-874ccbb1b71106dfee5a4768dc0cf09c63e4865b --- addons/l10n_ch/dta/dta_wizard.py | 6 +++--- addons/l10n_ch/dta/invoice.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/l10n_ch/dta/dta_wizard.py b/addons/l10n_ch/dta/dta_wizard.py index e52818b7e35..d4ff63cb61a 100644 --- a/addons/l10n_ch/dta/dta_wizard.py +++ b/addons/l10n_ch/dta/dta_wizard.py @@ -446,7 +446,7 @@ def _create_dta(self,cr,uid,data,context): continue - v['sequence'] = str(seq).rjust(5,'0') + v['sequence'] = str(seq).rjust(5).replace(' ','0') v['amount_to_pay']= str(dtal.amount_to_pay).replace('.',',') v['invoice_number'] = invoice_number or '' v['invoice_currency'] = i.currency_id.code or '' @@ -608,13 +608,13 @@ def _create_dta(self,cr,uid,data,context): inv_obj.write(cr,uid,[i.id],{'dta_state':'paid'}) dta_line_obj.write(cr,uid,[dtal.id],{'state':'done'}) seq += 1 - # bank statement updated with the total amount : pool.get('account.bank.statement').write(cr,uid,[bk_st_id],{'balance_end_real': amount_tot}) - # segment total + # segment total v['amount_total'] = str(amount_tot).replace('.',',') + v['sequence'] = str(seq).rjust(5).replace(' ','0') try: if dta : dta = dta + record_gt890(v).generate() diff --git a/addons/l10n_ch/dta/invoice.py b/addons/l10n_ch/dta/invoice.py index 8a4ac2614c2..6724928b487 100644 --- a/addons/l10n_ch/dta/invoice.py +++ b/addons/l10n_ch/dta/invoice.py @@ -70,7 +70,7 @@ class account_invoice(osv.osv): return result + str((10-report) % 10) -# 0100054150009>132000000000000000000000014+ 1300132412> + # 0100054150009>132000000000000000000000014+ 1300132412> def _check_bvr(self, cr, uid, ids): invoices = self.browse(cr,uid,ids) for invoice in invoices: