Skip to content

Commit

Permalink
[16.0][MIG] l10n_es_aeat_mod303: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoRomera committed Dec 27, 2022
1 parent 7d5fc28 commit 759a64a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
2 changes: 1 addition & 1 deletion l10n_es_aeat_mod303/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

{
"name": "AEAT modelo 303",
"version": "15.0.2.3.1",
"version": "16.0.1.0.0",
"category": "Accounting",
"development_status": "Mature",
"author": "Guadaltech,"
Expand Down
10 changes: 5 additions & 5 deletions l10n_es_aeat_mod303/models/mod303.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def _compute_marca_sepa(self):
# pylint:disable=missing-return
@api.depends("date_start", "cuota_compensar")
def _compute_exception_msg(self):
super(L10nEsAeatMod303Report, self)._compute_exception_msg()
super()._compute_exception_msg()
for mod303 in self.filtered(lambda x: x.state != "draft"):
# Get result from previous declarations, in order to identify if
# there is an amount to compensate.
Expand Down Expand Up @@ -446,7 +446,7 @@ def onchange_type(self):
self.previous_result = 0

def calculate(self):
res = super(L10nEsAeatMod303Report, self).calculate()
res = super().calculate()
for mod303 in self:
prev_reports = mod303._get_previous_fiscalyear_reports(
mod303.date_start
Expand Down Expand Up @@ -475,7 +475,7 @@ def button_confirm(self):
msg = _("Select an account for receiving the money")
if msg:
raise exceptions.UserError(msg)
return super(L10nEsAeatMod303Report, self).button_confirm()
return super().button_confirm()

@api.constrains("potential_cuota_compensar", "cuota_compensar")
def check_qty(self):
Expand All @@ -501,7 +501,7 @@ def _get_tax_lines(self, date_start, date_end, map_line):
or self.period_type not in ("4T", "12")
):
return self.env["account.move.line"]
return super(L10nEsAeatMod303Report, self)._get_tax_lines(
return super()._get_tax_lines(
date_start,
date_end,
map_line,
Expand All @@ -516,7 +516,7 @@ def _get_move_line_domain(self, date_start, date_end, map_line):
if 79 <= map_line.field_number <= 99 or map_line.field_number == 125:
date_start = date_start.replace(day=1, month=1)
date_end = date_end.replace(day=31, month=12)
return super(L10nEsAeatMod303Report, self)._get_move_line_domain(
return super()._get_move_line_domain(
date_start,
date_end,
map_line,
Expand Down
45 changes: 23 additions & 22 deletions l10n_es_aeat_mod303/views/mod303_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,35 +182,36 @@
attrs="{'readonly': [('statement_type', '!=', 'C')], 'required': [('statement_type', '=', 'C')]}"
/>
</group>
</group>
<group
class="oe_subtotal_footer oe_right"
attrs="{'invisible': [('state', '=', 'draft')]}"
colspan="2"
>
class="oe_subtotal_footer oe_right"
attrs="{'invisible': [('state', '=', 'draft')]}"
colspan="2"
>
<field
name="resultado_liquidacion"
class="oe_subtotal_footer_separator"
widget="monetary"
options="{'currency_field': 'currency_id'}"
/>
name="resultado_liquidacion"
widget="monetary"
options="{'currency_field': 'currency_id'}"
/>
<field
name="casilla_88"
class="oe_subtotal_footer_separator"
widget="monetary"
attrs="{'invisible': [('exonerated_390', '=', '2')]}"
options="{'currency_field': 'currency_id'}"
/>
name="casilla_88"
class="oe_subtotal_footer_separator"
widget="monetary"
attrs="{'invisible': [('exonerated_390', '=', '2')]}"
options="{'currency_field': 'currency_id'}"
/>
<field name="result_type" />
</group>
<group
</group>
<separator
string="Tax lines"
name="group_tax_lines"
colspan="4"
attrs="{'invisible': [('state', '=', 'draft')]}"
>
<field name="tax_line_ids" nolabel="1" readonly="1" />
</group>
/>
<field
name="tax_line_ids"
nolabel="1"
readonly="1"
attrs="{'invisible': [('state', '=', 'draft')]}"
/>
</group>
<form position="inside">
<div class="oe_chatter">
Expand Down

0 comments on commit 759a64a

Please sign in to comment.