Skip to content

Commit

Permalink
Merge PR OCA#402 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Dec 22, 2023
2 parents d7350f9 + 1eafa04 commit 9f8bde6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion l10n_eu_oss_oca/migrations/16.0.1.0.1/post-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ def migrate(cr, version):
env = api.Environment(cr, SUPERUSER_ID, {})
oss_taxes = env["account.tax"].search([("oss_country_id", "!=", False)])
for oss_tax in oss_taxes:
oss_tax.country_id = oss_tax.company_id.country_id
oss_tax.country_id = oss_tax.company_id.account_fiscal_country_id
2 changes: 1 addition & 1 deletion l10n_eu_oss_oca/tests/test_l10n_eu_oss.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,4 @@ def test_02(self):
}
]
)
self.assertEqual(move.tax_country_id, move.company_id.country_id)
self.assertEqual(move.tax_country_id, move.company_id.account_fiscal_country_id)
2 changes: 1 addition & 1 deletion l10n_eu_oss_oca/wizard/l10n_eu_oss_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _prepare_tax_vals(self, country_id, tax_id, rate, tax_group):
return {
"name": _("OSS for EU to %(country_name)s: %(rate)s")
% {"country_name": country_id.name, "rate": rate},
"country_id": self.company_id.country_id.id,
"country_id": self.company_id.account_fiscal_country_id.id,
"amount": rate,
"invoice_repartition_line_ids": self._prepare_repartition_line_vals(
tax_id.invoice_repartition_line_ids
Expand Down

0 comments on commit 9f8bde6

Please sign in to comment.