Skip to content

Commit

Permalink
[FIX] l10n_es_aeat_mod347: Save proper real state fields
Browse files Browse the repository at this point in the history
The provided field name was not correct.

Fixes #2001
  • Loading branch information
pedrobaeza committed Jan 18, 2022
1 parent 78b150b commit c4461d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions l10n_es_aeat_mod347/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
# Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2016 Tecnativa - Angel Moya <[email protected]>
# Copyright 2018 PESOL - Angel Moya <[email protected]>
# Copyright 2014-2020 Tecnativa - Pedro M. Baeza
# Copyright 2014-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "AEAT modelo 347",
"version": "13.0.1.3.1",
"version": "13.0.1.3.2",
"author": "Tecnativa,PESOL,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-spain",
"category": "Accounting",
Expand Down
11 changes: 7 additions & 4 deletions l10n_es_aeat_mod347/models/mod347.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# Copyright 2013 Joaquín Pedrosa Gutierrez (http://gutierrezweb.es)
# Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2016 Tecnativa - Angel Moya <[email protected]>
# Copyright 2014-2019 Tecnativa - Pedro M. Baeza
# Copyright 2018 PESOL - Angel Moya <[email protected]>
# Copyright 2019 Tecnativa - Carlos Dauden
# Copyright 2014-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

import datetime
Expand Down Expand Up @@ -693,9 +693,12 @@ def _onchange_partner_id(self):
"""Loads some partner data when the selected partner changes."""
if self.partner_id:
vals = self.report_id._get_partner_347_identification(self.partner_id,)
vals.pop("community_vat", None)
del vals["partner_country_code"]
self.update(vals)
self.update(
{
"partner_vat": vals.pop("partner_vat"),
"state_code": vals.pop("partner_state_code"),
}
)


class L10nEsAeatMod347MoveRecord(models.Model):
Expand Down

0 comments on commit c4461d4

Please sign in to comment.