[FIX] l10n_au: make invoice template primary

We don't want the changes related to a country to affect all the other
countries.

closes odoo/odoo#107395

X-original-commit: 5079ace74958d4acd54d24a95579289a2eda92f1
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
william-andre
2022-12-07 18:29:28 +01:00
parent 4b39ad7167
commit 8bbf678d8d
4 changed files with 15 additions and 1 deletions
+2
View File
@@ -2,3 +2,5 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2015 Willow IT Pty Ltd (<http://www.willowit.com.au>).
from . import models
+1
View File
@@ -0,0 +1 @@
from . import account_move
+11
View File
@@ -0,0 +1,11 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class AccountMove(models.Model):
_inherit = 'account.move'
def _get_name_invoice_report(self):
if self.company_id.account_fiscal_country_id.code == 'AU':
return 'l10n_au.report_invoice_document'
return super()._get_name_invoice_report()
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<template id="report_invoice_document" inherit_id="account.report_invoice_document" primary="True">
<xpath expr="//div[hasclass('page')]/h2" position="replace">
<h2>
<span t-if="o.move_type == 'out_invoice' and o.state == 'posted'">Tax Invoice</span>