Skip to content

Commit

Permalink
[FIX] l10n_es_aeat_mod349: Corregido cálculo de periodo en base al me…
Browse files Browse the repository at this point in the history
…s del apunte.
  • Loading branch information
jesusVMayor authored and pedrobaeza committed Jan 31, 2020
1 parent a08db74 commit dc54743
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion l10n_es_aeat_mod349/__manifest__.py
Expand Up @@ -9,7 +9,7 @@

{
"name": "Modelo 349 AEAT",
"version": "12.0.1.2.1",
"version": "12.0.1.2.2",
"author": "Tecnativa, "
"Eficent, "
"Odoo Community Association (OCA)",
Expand Down
4 changes: 2 additions & 2 deletions l10n_es_aeat_mod349/models/mod349.py
Expand Up @@ -9,7 +9,7 @@
# <contact@eficent.com>
# Copyright 2018 - Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

import math
import re
from odoo import models, fields, api, exceptions, _
from odoo.tools import float_is_zero
Expand Down Expand Up @@ -231,7 +231,7 @@ def _create_349_refund_records(self):
if self.period_type == '0A':
period_type = '0A'
elif self.period_type in ('1T', '2T', '3T', '4T'):
period_type = '%sT' % (int(month) % 4)
period_type = '%sT' % int(math.ceil(int(month) / 3.0))
else:
period_type = month
key = (partner, op_key, period_type, year)
Expand Down

0 comments on commit dc54743

Please sign in to comment.