[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)

This commit is contained in:
Ravi Gohil 2014-06-18 15:49:38 +05:30
parent 86b80cf95e
commit d1e9633c46
1 changed files with 1 additions and 1 deletions

View File

@ -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')