From d1e9633c46a755d3c758fb19860509acc355845d Mon Sep 17 00:00:00 2001 From: Ravi Gohil Date: Wed, 18 Jun 2014 15:49:38 +0530 Subject: [PATCH] [FIX] l10n_be_invoice_bba: Fixed the length of random generated code to ensure it generates 10 digit code so that it allows validation of invoice. (Maintenance Case: 608485) --- addons/l10n_be_invoice_bba/invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_be_invoice_bba/invoice.py b/addons/l10n_be_invoice_bba/invoice.py index 854593a87cc..499e6e6c4ac 100644 --- a/addons/l10n_be_invoice_bba/invoice.py +++ b/addons/l10n_be_invoice_bba/invoice.py @@ -141,7 +141,7 @@ class account_invoice(osv.osv): elif algorithm == 'random': if not self.check_bbacomm(reference): base = random.randint(1, 9999999999) - bbacomm = str(base).rjust(7, '0') + bbacomm = str(base).rjust(10, '0') base = int(bbacomm) mod = base % 97 or 97 mod = str(mod).rjust(2, '0')