account-payment-team team mailing list archive
-
account-payment-team team
-
Mailing list archive
-
Message #00042
[Merge] lp:~therp-nl/account-payment/6.1-account_voucher_tax_filter into lp:account-payment
Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/account-payment/6.1-account_voucher_tax_filter into lp:account-payment.
Requested reviews:
Guewen Baconnier @ Camptocamp (gbaconnier-c2c)
For more details, see:
https://code.launchpad.net/~therp-nl/account-payment/6.1-account_voucher_tax_filter/+merge/133928
This branch implements sale/purchase tax filtering when creating a sale or purchase voucher.
--
https://code.launchpad.net/~therp-nl/account-payment/6.1-account_voucher_tax_filter/+merge/133928
Your team Account Payment is subscribed to branch lp:account-payment.
=== added directory 'account_voucher_tax_filter'
=== added file 'account_voucher_tax_filter/__init__.py'
=== added file 'account_voucher_tax_filter/__openerp__.py'
--- account_voucher_tax_filter/__openerp__.py 1970-01-01 00:00:00 +0000
+++ account_voucher_tax_filter/__openerp__.py 2012-12-10 09:47:20 +0000
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# This module copyright (C) 2012 Therp BV (<http://therp.nl>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero 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.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+ "name": "Account voucher tax filter",
+ "version": "1.0r028",
+ "author": "Therp BV",
+ "category": 'Accounting & Finance',
+ 'complexity': "normal",
+ "description": """
+This module adds dynamic filters on sale and purchase vouchers so that
+sale taxes cannot be used on purchase vouchers and vice versa.
+
+This addon is compatible with OpenERP 6.1. In OpenERP 7.0, the tax
+selection has been added to the specific views for sale and purchase taxes.
+For the generic view, the missing filter has been reported as lp:1081097 and
+a solution has been proposed. Note that you should probably avoid using the
+generic view to create sale or purchase vouchers anyway due to lp:1080840
+ """,
+ 'website': 'http://therp.nl',
+ 'images': [],
+ 'depends': ['account_voucher'],
+ 'data': [
+ 'view/account_voucher.xml',
+ ],
+ "license": 'AGPL-3',
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added directory 'account_voucher_tax_filter/view'
=== added file 'account_voucher_tax_filter/view/account_voucher.xml'
--- account_voucher_tax_filter/view/account_voucher.xml 1970-01-01 00:00:00 +0000
+++ account_voucher_tax_filter/view/account_voucher.xml 2012-12-10 09:47:20 +0000
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="view_voucher_form" model="ir.ui.view">
+ <field name="name">Voucher form: apply tax domain</field>
+ <field name="model">account.voucher</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="account_voucher.view_voucher_form"/>
+ <field name="priority" eval="100"/>
+ <field name="arch" type="xml">
+ <field name="tax_id" position="attributes">
+ <attribute name="widget">many2one</attribute>
+ <attribute name="domain">(
+ [('company_id', '=', company_id), ('parent_id', '=', False)] +
+ (
+ type == 'sale' and [('type_tax_use', 'in', ['sale', 'all'])]
+ or type == 'purchase' and [('type_tax_use', 'in', ['purchase', 'all'])]
+ or []
+ )
+ )</attribute>
+ </field>
+ </field>
+ </record>
+ <record id="view_sale_receipt_form" model="ir.ui.view">
+ <field name="name">Sales voucher form: apply tax domain</field>
+ <field name="model">account.voucher</field>
+ <field name="type">form</field>
+ <field name="priority" eval="100"/>
+ <field name="inherit_id" ref="account_voucher.view_sale_receipt_form"/>
+ <field name="arch" type="xml">
+ <field name="tax_id" position="attributes">
+ <attribute name="widget">many2one</attribute>
+ <attribute name="domain">[
+ ('company_id', '=', company_id), ('parent_id', '=', False),
+ ('type_tax_use', 'in', ['sale', 'all'])
+ ]</attribute>
+ </field>
+ </field>
+ </record>
+ <record id="view_purchase_receipt_form" model="ir.ui.view">
+ <field name="name">Purchase voucher form: apply tax domain</field>
+ <field name="model">account.voucher</field>
+ <field name="type">form</field>
+ <field name="priority" eval="100"/>
+ <field name="inherit_id" ref="account_voucher.view_purchase_receipt_form"/>
+ <field name="arch" type="xml">
+ <field name="tax_id" position="attributes">
+ <attribute name="widget">many2one</attribute>
+ <attribute name="domain">[
+ ('company_id', '=', company_id), ('parent_id', '=', False),
+ ('type_tax_use', 'in', ['purchase', 'all'])
+ ]</attribute>
+ </field>
+ </field>
+ </record>
+ </data>
+</openerp>
Follow ups