Skip to content

Commit

Permalink
[MIG] account_multi_vat: Migration to 15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JasminSForgeFlow committed Mar 29, 2023
1 parent 4bf57fa commit aa6f460
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 81 deletions.
2 changes: 1 addition & 1 deletion account_multi_vat/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"summary": """
Allows setting multiple VAT numbers on any partner and select the right one
depending on the fiscal position and delivery address of the invoice.""",
"version": "14.0.1.0.0",
"version": "15.0.1.0.0",
"development_status": "Beta",
"license": "AGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
Expand Down
2 changes: 1 addition & 1 deletion account_multi_vat/models/account_tax.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AccountTax(models.Model):
comodel_name="res.country",
related=False,
compute="_compute_country_id",
store=False,
store=True,
readonly=True,
)

Expand Down
4 changes: 2 additions & 2 deletions account_multi_vat/tests/common.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo.tests.common import SavepointCase
from odoo.tests.common import TransactionCase


class CommonAccountMultiVat(SavepointCase):
class CommonAccountMultiVat(TransactionCase):
@classmethod
def setUpClass(cls):
super(CommonAccountMultiVat, cls).setUpClass()
Expand Down
78 changes: 1 addition & 77 deletions account_multi_vat/views/report_invoice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<template
id="multi_vat_report_invoice_document"
inherit_id="account.report_invoice_document"
priority="99"
>
<xpath expr="//div[@t-if='o.partner_id.vat']" position="replace">
<div t-if="o.partner_id.has_vat" class="mt16">
Expand All @@ -17,81 +18,4 @@
</div>
</xpath>
</template>
<template id="external_layout_multi_vat" inherit_id="web.external_layout_standard">
<xpath
expr="//li[@t-if='company.vat']/span[@t-field='company.vat']"
position="replace"
>
<t
t-if="'fiscal_position_id' in o._fields and o._name == 'account.move' and o.move_type in ['out_invoice', 'out_refund']"
>
<span
t-esc="company.partner_id._get_vat_number_for_administration(o.fiscal_position_id.vat_partner_id)"
/>
</t>
<t t-else="else">
<span t-field="company.vat" />
</t>
</xpath>
</template>
<template
id="external_layout_multi_vat_clean"
inherit_id="web.external_layout_clean"
>
<xpath
expr="//li[@t-if='company.vat']/span[@t-field='company.vat']"
position="replace"
>
<t
t-if="'fiscal_position_id' in o._fields and o._name == 'account.move' and o.move_type in ['out_invoice', 'out_refund']"
>
<span
t-esc="company.partner_id._get_vat_number_for_administration(o.fiscal_position_id.vat_partner_id)"
/>
</t>
<t t-else="else">
<span t-field="company.vat" />
</t>
</xpath>
</template>
<template
id="external_layout_multi_vat_boxed"
inherit_id="web.external_layout_boxed"
>
<xpath
expr="//li[@t-if='company.vat']/span[@t-field='company.vat']"
position="replace"
>
<t
t-if="'fiscal_position_id' in o._fields and o._name == 'account.move' and o.move_type in ['out_invoice', 'out_refund']"
>
<span
t-esc="company.partner_id._get_vat_number_for_administration(o.fiscal_position_id.vat_partner_id)"
/>
</t>
<t t-else="else">
<span t-field="company.vat" />
</t>
</xpath>
</template>
<template
id="external_layout_multi_vat_background"
inherit_id="web.external_layout_background"
>
<xpath
expr="//li[@t-if='company.vat']/span[@t-field='company.vat']"
position="replace"
>
<t
t-if="'fiscal_position_id' in o._fields and o._name == 'account.move' and o.move_type in ['out_invoice', 'out_refund']"
>
<span
t-esc="company.partner_id._get_vat_number_for_administration(o.fiscal_position_id.vat_partner_id)"
/>
</t>
<t t-else="else">
<span t-field="company.vat" />
</t>
</xpath>
</template>
</odoo>

0 comments on commit aa6f460

Please sign in to comment.