Skip to content
Snippets Groups Projects
Commit b66d8411 authored by Josse Colpaert's avatar Josse Colpaert
Browse files

[IMP] l10n_ca: add PST number on partner for the invoice


If you have a PST number, certain taxes
don't need to be paid, but the number
should be indicated on the invoice however.

opw-1951352
Closes #31982

Signed-off-by: default avatarCedric Snauwaert (csn) <csn@openerp.com>
parent e967435b
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
# Copyright (C) 2010 Savoir-faire Linux (<https://www.savoirfairelinux.com>).
from odoo import api, SUPERUSER_ID
from . import models
def load_translations(cr, registry):
......
......@@ -47,6 +47,8 @@ position.
'data/fiscal_templates_data.xml',
'data/account_chart_template_configure_data.xml',
'data/res_company_data.xml',
'views/res_partner_view.xml',
'views/report_invoice.xml',
],
'post_init_hook': 'load_translations',
}
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import res_partner
# coding: utf-8
from odoo import api, fields, models, _
class ResPartner(models.Model):
_inherit = 'res.partner'
l10n_ca_pst = fields.Char('PST')
<odoo>
<template id="l10n_ca_report_invoice_document_inherit" inherit_id="account.report_invoice_document">
<div t-if="o.partner_id.vat" position="after">
<t t-if="o.company_id.country_id.code == 'CA' and o.partner_id.l10n_ca_pst" class="mt16">
<div>PST: <span t-field="o.partner_id.l10n_ca_pst"/></div>
</t>
</div>
</template>
</odoo>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="res_partner_form_inherit_ca" model="ir.ui.view">
<field name="name">res.partner.form.inherit.l10n.ca</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='vat']" position="after">
<field name="l10n_ca_pst"/>
</xpath>
</field>
</record>
</data>
</odoo>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment