Skip to content

Commit

Permalink
Merge PR #1136 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by dhongu
  • Loading branch information
OCA-git-bot committed Nov 26, 2024
2 parents 6cf4b93 + b6aa264 commit 8b013ce
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions l10n_ro_account/models/account_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,16 @@ def external_code_to_internal(self, code):
return account_id

def internal_to_external(self):
if self.code and not self.code.isdigit():
return self.code
if not self.code or len(self.code) < 4:
return self.code
cont = self.code[:4]
while cont and cont[-1] == "0":
cont = cont[:-1]
try:
analitic = int(self.code[4:])
except Exception:
analitic = self.code[4:]
if analitic:
cont += "." + str(analitic)

analytic = int(self.code[4:])
cont += "." + str(analytic)
return cont

def name_get(self):
Expand Down

0 comments on commit 8b013ce

Please sign in to comment.