[FIX] l10n_be_invoice_bba: Fixed the length of random generated code to ensure it...
authorRavi Gohil <rgo@tinyerp.com>
Wed, 18 Jun 2014 10:19:38 +0000 (15:49 +0530)
committerRavi Gohil <rgo@tinyerp.com>
Wed, 18 Jun 2014 10:19:38 +0000 (15:49 +0530)
addons/l10n_be_invoice_bba/invoice.py

index 854593a..499e6e6 100644 (file)
@@ -141,7 +141,7 @@ class account_invoice(osv.osv):
                 elif algorithm == 'random':\r
                     if not self.check_bbacomm(reference):\r
                         base = random.randint(1, 9999999999)\r
-                        bbacomm = str(base).rjust(7, '0')\r
+                        bbacomm = str(base).rjust(10, '0')\r
                         base = int(bbacomm)\r
                         mod = base % 97 or 97\r
                         mod = str(mod).rjust(2, '0')\r