Skip to content
Permalink
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.
  • Loading branch information...
jco-odoo committed Mar 19, 2019
1 parent 31983e0 commit 70e637c7a67f02e5bcc2cc1a414511b0e580a443
@@ -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 @@
'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',
}
@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from . import res_partner
@@ -0,0 +1,8 @@
# coding: utf-8
from odoo import api, fields, models, _


class ResPartner(models.Model):
_inherit = 'res.partner'

l10n_ca_pst = fields.Char('PST')
@@ -0,0 +1,15 @@
<?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>

0 comments on commit 70e637c

Please sign in to comment.
You can’t perform that action at this time.