Skip to content

Commit

Permalink
[16.0][FIX]l10n_es_aeat_mod369: decimal places and box 7
Browse files Browse the repository at this point in the history
  • Loading branch information
arantxa-s73 committed Jan 20, 2025
1 parent deca44f commit 4f21adc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions l10n_es_aeat_mod369/models/mod369_line_grouped.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@ def _compute_base_str(self):
def _compute_amount_str(self):
for line in self:
amount_split = str(line.amount).split(".")
line.amount_str = amount_split[0].zfill(15) + amount_split[1].zfill(2)
line.amount_str = amount_split[0].zfill(15) + amount_split[1].ljust(2, "0")

Check warning on line 154 in l10n_es_aeat_mod369/models/mod369_line_grouped.py

View check run for this annotation

Codecov / codecov/patch

l10n_es_aeat_mod369/models/mod369_line_grouped.py#L154

Added line #L154 was not covered by tests

@api.depends("tax_correction")
def _compute_tax_correction_str(self):
for line in self:
tax_correction_split = str(line.tax_correction).split(".")
line.tax_correction_str = tax_correction_split[0].zfill(
15
) + tax_correction_split[1].zfill(2)
integer_part = tax_correction_split[0].zfill(15)
decimal_part = tax_correction_split[1].ljust(2, "0")
line.tax_correction_str = integer_part + decimal_part

Check warning on line 162 in l10n_es_aeat_mod369/models/mod369_line_grouped.py

View check run for this annotation

Codecov / codecov/patch

l10n_es_aeat_mod369/models/mod369_line_grouped.py#L160-L162

Added lines #L160 - L162 were not covered by tests

@api.depends("oss_country_id", "oss_country_id.code")
def _compute_country_code(self):
Expand Down

0 comments on commit 4f21adc

Please sign in to comment.