openerp-canada team mailing list archive
-
openerp-canada team
-
Mailing list archive
-
Message #00000
lp:~openerp-canada/openobject-addons/l10n_ca_chart_of_taxes_and_decimal_precision into lp:openobject-addons
Maxime Chambreuil (http://www.savoirfairelinux.com) has proposed merging lp:~openerp-canada/openobject-addons/l10n_ca_chart_of_taxes_and_decimal_precision into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
- Improvement to chart of taxes
- Canadian tax is 7.5% so we need 3 digits as the decimal_precision for account
--
https://code.launchpad.net/~openerp-canada/openobject-addons/l10n_ca_chart_of_taxes_and_decimal_precision/+merge/40581
Your team OpenERP Canada Team is subscribed to branch lp:~openerp-canada/openobject-addons/l10n_ca_chart_of_taxes_and_decimal_precision.
=== modified file 'account/account.py'
--- account/account.py 2010-11-10 08:20:11 +0000
+++ account/account.py 2010-11-10 21:51:28 +0000
@@ -1843,7 +1843,10 @@
if tax.child_ids:
if tax.child_depend:
latest = res.pop()
- amount = amount2
+ if tax.include_base_amount:
+ amount = cur_price_unit + amount2
+ else:
+ amount = amount2
child_tax = self._unit_compute(cr, uid, tax.child_ids, amount, address_id, product, partner, quantity)
res.extend(child_tax)
if tax.child_depend:
@@ -1860,8 +1863,6 @@
r[name+'_sign'] = latest[name+'_sign']
r['amount'] = data['amount']
latest[name+'_code_id'] = False
- if tax.include_base_amount:
- cur_price_unit+=amount2
return res
def compute_all(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None):
=== modified file 'hr/security/hr_security.xml'
--- hr/security/hr_security.xml 2010-11-01 12:46:06 +0000
+++ hr/security/hr_security.xml 2010-11-10 21:51:28 +0000
@@ -9,8 +9,5 @@
<record id="base.group_hr_user" model="res.groups">
<field name="name">Human Resources / User</field>
</record>
- <record id="base.user_demo" model="res.users">
- <field name="groups_id" eval="[(4, ref('base.group_hr_user'))]"/>
- </record>
</data>
</openerp>
=== modified file 'l10n_ca/__init__.py'
--- l10n_ca/__init__.py 2010-10-25 13:23:05 +0000
+++ l10n_ca/__init__.py 2010-11-10 21:51:28 +0000
@@ -2,19 +2,19 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
+# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
+# it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
+# GNU General Public License for more details.
#
-# You should have received a copy of the GNU Affero General Public License
+# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
=== modified file 'l10n_ca/__openerp__.py'
--- l10n_ca/__openerp__.py 2010-10-27 09:55:33 +0000
+++ l10n_ca/__openerp__.py 2010-11-10 21:51:28 +0000
@@ -28,6 +28,7 @@
"depends" : ['base', 'account', 'base_iban', 'base_vat', 'account_chart'],
"init_xml" : [],
"update_xml" : [
+ 'decimal_precision.xml',
'account_types_en.xml',
'account_chart_en.xml',
'account_tax_code_en.xml',
=== modified file 'l10n_ca/account_tax_fr.xml'
--- l10n_ca/account_tax_fr.xml 2010-10-25 13:23:05 +0000
+++ l10n_ca/account_tax_fr.xml 2010-11-10 21:51:28 +0000
@@ -2,18 +2,25 @@
<openerp>
<data noupdate="1">
- <record id="notax_fr" model="account.tax.template">
- <field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
- <field name="name">Pas de taxes</field>
- <field name="description">Pas de taxes</field>
- <field name="amount">0.00</field>
- <field name="type">percent</field>
- </record>
+ <record id="tpstvq_fr" model="account.tax.template">
+ <field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
+ <field name="name">TPS (5%)</field>
+ <field name="description">TPSTVQ</field>
+ <field name="amount">0.050000</field>
+ <field name="type">percent</field>
+ <field name="include_base_amount">TRUE</field>
+ <field name="account_collected_id" ref="chart241100_fr"/>
+ <field name="account_paid_id" ref="chart242100_fr"/>
+ <field name="base_code_id" ref="vat_code_base_receivable_tps_fr"/>
+ <field name="tax_code_id" ref="vat_code_receivable_tps_fr"/>
+ <field name="ref_base_code_id" ref="vat_code_base_payable_tps_fr"/>
+ <field name="ref_tax_code_id" ref="vat_code_payable_tps_fr"/>
+ </record>
<record id="tvq_fr" model="account.tax.template">
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
<field name="name">TVQ (7.5%)</field>
- <field name="code">TVQ</field>
+ <field name="description">TVQ</field>
<field name="amount">0.075000</field>
<field name="type">percent</field>
<field name="account_collected_id" ref="chart241200_fr"/>
@@ -22,27 +29,13 @@
<field name="tax_code_id" ref="vat_code_receivable_tvq_fr"/>
<field name="ref_base_code_id" ref="vat_code_base_payable_tvq_fr"/>
<field name="ref_tax_code_id" ref="vat_code_payable_tvq_fr"/>
- </record>
-
- <record id="tps_fr" model="account.tax.template">
- <field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
- <field name="name">TPS (5.0%)</field>
- <field name="code">TPS</field>
- <field name="amount">0.050000</field>
- <field name="type">percent</field>
- <field name="account_collected_id" ref="chart241100_fr"/>
- <field name="account_paid_id" ref="chart242100_fr"/>
- <field name="base_code_id" ref="vat_code_base_receivable_tps_fr"/>
- <field name="tax_code_id" ref="vat_code_receivable_tps_fr"/>
- <field name="ref_base_code_id" ref="vat_code_base_payable_tps_fr"/>
- <field name="ref_tax_code_id" ref="vat_code_payable_tps_fr"/>
- <field name="parent_id" ref="tvq_fr"/>
+ <field name="parent_id" ref="tpstvq_fr"/>
</record>
<record id="tvh_fr" model="account.tax.template">
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
<field name="name">TVH (13%)</field>
- <field name="code">TVH</field>
+ <field name="description">TVH</field>
<field name="amount">0.130000</field>
<field name="type">percent</field>
<field name="account_collected_id" ref="chart241300_fr"/>
@@ -53,5 +46,27 @@
<field name="ref_tax_code_id" ref="vat_code_payable_tvh_fr"/>
</record>
-</data>
+ <record id="tps_fr" model="account.tax.template">
+ <field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
+ <field name="name">TPS (5%)</field>
+ <field name="description">TPS</field>
+ <field name="amount">0.050000</field>
+ <field name="type">percent</field>
+ <field name="account_collected_id" ref="chart241100_fr"/>
+ <field name="account_paid_id" ref="chart242100_fr"/>
+ <field name="base_code_id" ref="vat_code_base_receivable_tps_fr"/>
+ <field name="tax_code_id" ref="vat_code_receivable_tps_fr"/>
+ <field name="ref_base_code_id" ref="vat_code_base_payable_tps_fr"/>
+ <field name="ref_tax_code_id" ref="vat_code_payable_tps_fr"/>
+ </record>
+
+ <record id="notax_fr" model="account.tax.template">
+ <field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
+ <field name="name">Pas de taxes</field>
+ <field name="description">Pas de taxes</field>
+ <field name="amount">0.00</field>
+ <field name="type">percent</field>
+ </record>
+
+ </data>
</openerp>
=== added file 'l10n_ca/decimal_precision.xml'
--- l10n_ca/decimal_precision.xml 1970-01-01 00:00:00 +0000
+++ l10n_ca/decimal_precision.xml 2010-11-10 21:51:28 +0000
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record id="product.decimal_account" model="decimal.precision">
+ <field name="digits">3</field>
+ </record>
+
+ </data>
+</openerp>
=== modified file 'l10n_ca/fiscal_templates_fr.xml'
--- l10n_ca/fiscal_templates_fr.xml 2010-10-25 13:23:05 +0000
+++ l10n_ca/fiscal_templates_fr.xml 2010-11-10 21:51:28 +0000
@@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
-<data>
+ <data>
<!-- Fiscal Position Templates -->
<record id="fiscal_position_template_1_fr" model="account.fiscal.position.template">
- <field name="name">Régime Provincial</field>
+ <field name="name">Provincial Regime</field>
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
</record>
<record id="fiscal_position_template_2_fr" model="account.fiscal.position.template">
- <field name="name">Régime Provinces Harmonisées</field>
+ <field name="name">Harmonized Provinces Regime</field>
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
</record>
<record id="fiscal_position_template_3_fr" model="account.fiscal.position.template">
- <field name="name">Régime Provinces Non-Harmonisées</field>
+ <field name="name">Non-Harmonized Provinces Regime</field>
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
</record>
<record id="fiscal_position_template_4_fr" model="account.fiscal.position.template">
- <field name="name">Régime International</field>
+ <field name="name">International Regime</field>
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
</record>
@@ -29,51 +29,78 @@
<record id="fiscal_position_tax_template_1_fr" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_1_fr" />
- <field name="tax_src_id" ref="tvq_fr" />
- <field name="tax_dest_id" ref="notax_fr" />
+ <field name="tax_src_id" ref="tpstvq_fr" />
+ <field name="tax_dest_id" ref="tpstvq_fr" />
</record>
<record id="fiscal_position_tax_template_2_fr" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_2_fr" />
- <field name="tax_src_id" ref="tvh_fr" />
- <field name="tax_dest_id" ref="notax_fr" />
+ <field name="tax_src_id" ref="tpstvq_fr" />
+ <field name="tax_dest_id" ref="tvh_fr" />
</record>
+
<record id="fiscal_position_tax_template_3_fr" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_3_fr" />
- <field name="tax_src_id" ref="tps_fr" />
- <field name="tax_dest_id" ref="notax_fr" />
+ <field name="tax_src_id" ref="tpstvq_fr" />
+ <field name="tax_dest_id" ref="tps_fr" />
</record>
+
<record id="fiscal_position_tax_template_4_fr" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_4_fr" />
- <field name="tax_src_id" ref="notax_fr" />
+ <field name="tax_src_id" ref="tpstvq_fr" />
<field name="tax_dest_id" ref="notax_fr" />
</record>
- <!-- Fiscal Position Account Templates -->
-
- <record id="fiscal_position_account_template_1_fr" model="account.fiscal.position.account.template">
- <field name="position_id" ref="fiscal_position_template_1_fr" />
- <field name="account_src_id" ref="chart411110_fr" />
+ <!-- Fiscal Position Account Templates - Goods -->
+
+ <record id="fiscal_position_account_template_1_fr" model="account.fiscal.position.account.template">
+ <field name="position_id" ref="fiscal_position_template_1_fr" />
+ <field name="account_src_id" ref="chart411110_fr" />
+ <field name="account_dest_id" ref="chart411110_fr" />
+ </record>
+
+ <record id="fiscal_position_account_template_2_fr" model="account.fiscal.position.account.template">
+ <field name="position_id" ref="fiscal_position_template_2_fr" />
+ <field name="account_src_id" ref="chart411110_fr" />
+ <field name="account_dest_id" ref="chart411120_fr" />
+ </record>
+
+ <record id="fiscal_position_account_template_3_fr" model="account.fiscal.position.account.template">
+ <field name="position_id" ref="fiscal_position_template_3_fr" />
+ <field name="account_src_id" ref="chart411110_fr" />
+ <field name="account_dest_id" ref="chart411130_fr" />
+ </record>
+
+ <record id="fiscal_position_account_template_4_fr" model="account.fiscal.position.account.template">
+ <field name="position_id" ref="fiscal_position_template_4_fr" />
+ <field name="account_src_id" ref="chart411110_fr" />
+ <field name="account_dest_id" ref="chart411140_fr" />
+ </record>
+
+ <!-- Fiscal Position Account Templates - Services -->
+
+ <record id="fiscal_position_account_template_1_fr" model="account.fiscal.position.account.template">
+ <field name="position_id" ref="fiscal_position_template_1_fr" />
+ <field name="account_src_id" ref="chart411210_fr" />
<field name="account_dest_id" ref="chart411210_fr" />
</record>
<record id="fiscal_position_account_template_2_fr" model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_2_fr" />
- <field name="account_src_id" ref="chart411120_fr" />
+ <field name="account_src_id" ref="chart411210_fr" />
<field name="account_dest_id" ref="chart411220_fr" />
</record>
<record id="fiscal_position_account_template_3_fr" model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_3_fr" />
- <field name="account_src_id" ref="chart411130_fr" />
+ <field name="account_src_id" ref="chart411210_fr" />
<field name="account_dest_id" ref="chart411230_fr" />
</record>
<record id="fiscal_position_account_template_4_fr" model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_4_fr" />
- <field name="account_src_id" ref="chart411140_fr" />
+ <field name="account_src_id" ref="chart411210_fr" />
<field name="account_dest_id" ref="chart411240_fr" />
</record>
-
-</data>
+ </data>
</openerp>