mirror of
https://github.com/bringout/oca-ocb-l10n_europe.git
synced 2026-04-27 09:22:00 +02:00
19.0 vanilla
This commit is contained in:
parent
ff721d030e
commit
7721452493
1826 changed files with 124775 additions and 274114 deletions
|
|
@ -24,7 +24,7 @@ class AccountMove(models.Model):
|
|||
ocr_length = self.journal_id.l10n_se_invoice_ocr_length
|
||||
|
||||
if len(reference) + 1 > ocr_length:
|
||||
raise UserError(_("OCR Reference Number length is greater than allowed. Allowed length in invoice journal setting is %s.") % str(ocr_length))
|
||||
raise UserError(_("OCR Reference Number length is greater than allowed. Allowed length in invoice journal setting is %s.", ocr_length))
|
||||
|
||||
reference = reference.rjust(ocr_length - 1, '0')
|
||||
return reference + luhn.calc_check_digit(reference)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue