Ver código fonte

commit inicial

Rodney Enciso Arias 7 anos atrás
commit
51b950dd5f

+ 0 - 0
.scannerwork/.sonar_lock


+ 5 - 0
.scannerwork/report-task.txt

@@ -0,0 +1,5 @@
+projectKey=eiru:hide:Tax
+serverUrl=http://181.40.66.126:9000
+dashboardUrl=http://181.40.66.126:9000/dashboard/index/eiru:hide:Tax
+ceTaskId=AV9JeSZILmS3QZZeLmtj
+ceTaskUrl=http://181.40.66.126:9000/api/ce/task?id=AV9JeSZILmS3QZZeLmtj

+ 22 - 0
__init__.py

@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Globalteckz
+#    Copyright (C) 2013-Today(www.globalteckz.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
+#    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/>.
+#
+##############################################################################
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

BIN
__init__.pyc


+ 49 - 0
__openerp__.py

@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Globalteckz
+#    Copyright (C) 2013-Today(www.globalteckz.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
+#    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' : 'Tax Disable',
+    'version' : '1.0',
+    'author' : 'Globalteckz / Eiru',
+    'images': ['static/description/tax_disable_banner.png'],
+    'description': """
+        This module customizes default behaviour of tax configuration on 
+        sale order's, purchase order's and Invoices. Specially designed for Saudi Arabia business to hide the tax details on
+        invoices/Sales/Purchase order and from Sale Order's, Purchase Order's and Invoice as well as hiding the tax 
+        menu from the Accounting configuration menu
+    """,
+    'category': 'Accounts and Tax Configuration',
+    'website' : 'www.eiru.com.py',
+    'depends' : ['sale','account','purchase'],
+    'demo' : [],
+    'data' : [
+            'views/sale_view.xml',
+            'views/product_view.xml',
+            'views/account_view.xml',
+            'views/purchase_view.xml'
+            ],
+    'test' : [],
+    'auto_install': False,
+    'application': True,
+    'installable': True,
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

+ 4 - 0
sonar-project.properties

@@ -0,0 +1,4 @@
+sonar.projectKey=eiru:hide:Tax 
+sonar.projectName=eiru_hide_Tax 
+sonar.projectVersion=1.0 
+sonar.sources=.

+ 86 - 0
views/account_view.xml

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record model="ir.ui.view" id="account_invoice_view_modify">
+            <field name="name">account.invoice.view.modify</field>
+            <field name="model">account.invoice</field>
+            <field name="inherit_id" ref="account.invoice_form"/>
+            <field name="arch" type="xml">
+                <data>
+                    <xpath expr="//group[@class='oe_subtotal_footer oe_right']/div" position="attributes">
+                        <attribute name="invisible">True</attribute>
+                    </xpath>
+                    
+                    <xpath expr="//group[@class='oe_subtotal_footer oe_right']/field[@name='amount_tax']" position="attributes">
+                        <attribute name="invisible">True</attribute>
+                    </xpath>
+                    
+                    <xpath expr="//notebook/page/field[@name='invoice_line']/tree/field[@name='invoice_line_tax_id']" position="attributes">
+                        <attribute name="invisible">True</attribute>
+                    </xpath>
+                    
+                    <xpath expr="//notebook/page/field[@name='tax_line']" position="attributes">
+                        <attribute name="invisible">True</attribute>
+                    </xpath>
+                </data>
+            </field>
+        </record>
+
+        <record model="ir.ui.view" id="account_invoice_view_inherit_1">
+            <field name="name">account.invoice.view.inherit1</field>
+            <field name="model">account.voucher</field>
+            <field name="inherit_id" ref="account_voucher.view_sale_receipt_form"/>
+            <field name="arch" type="xml">
+                <data>
+                    <xpath expr="//group[@class='oe_subtotal_footer oe_right']/field[@name='tax_id']" position="attributes">
+                        <attribute name="invisible">1</attribute>
+                    </xpath>
+                    <xpath expr="//field[@name='tax_amount']" position="attributes">
+                        <attribute name="invisible">1</attribute>
+                    </xpath>
+                </data>
+            </field>
+        </record>
+
+        <record model="ir.ui.view" id="account_invoice_supplier">
+            <field name="name">account.invoice.supplier</field>
+            <field name="model">account.invoice</field>
+            <field name="inherit_id" ref="account.invoice_supplier_form"/>
+            <field name="arch" type="xml">
+                <data>
+                    <xpath expr="//group[@class='oe_subtotal_footer oe_right']/div" position="attributes">
+                        <attribute name="invisible">1</attribute>
+                    </xpath>
+
+                    <xpath expr="//group[@class='oe_subtotal_footer oe_right']/field[@name='amount_tax']" position="attributes">
+                        <attribute name="invisible">1</attribute>
+                    </xpath>
+
+                    <xpath expr="//notebook/page/field[@name='invoice_line']/tree/field[@name='invoice_line_tax_id']" position="attributes">
+                        <attribute name="invisible">1</attribute>
+                    </xpath>
+
+                    <xpath expr="//notebook/page/div/field[@name='tax_line']" position="attributes">
+                        <attribute name="invisible">1</attribute>
+                    </xpath>
+                </data>
+            </field>
+        </record>
+
+        <record model="ir.ui.view" id="account_purchase_receipt">
+            <field name="name">account.purchase.receipt</field>
+            <field name="model">account.voucher</field>
+            <field name="inherit_id" ref="account_voucher.view_purchase_receipt_form"/>
+            <field name="arch" type="xml">
+                <data>
+                    <xpath expr="//group[@class='oe_subtotal_footer oe_right']/field[@name='tax_id']" position="attributes">
+                        <attribute name="invisible">1</attribute>
+                    </xpath>
+                    <xpath expr="//field[@name='tax_amount']" position="attributes">
+                        <attribute name="invisible">1</attribute>
+                    </xpath>
+                </data>
+            </field>
+        </record>
+    </data>
+</openerp>

+ 19 - 0
views/product_view.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="product_product_inherited" model="ir.ui.view">
+            <field name="name">product.product.inherited</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <xpath expr="//field[@name='taxes_id']" position="attributes">
+                    <attribute name="invisible">True</attribute>
+                </xpath>
+                <xpath expr="//field[@name='supplier_taxes_id']" position="attributes">
+                    <attribute name="invisible">True</attribute>
+                </xpath>
+            </field>
+        </record>   
+    </data>
+</openerp>

+ 53 - 0
views/purchase_view.xml

@@ -0,0 +1,53 @@
+<openerp>
+    <data>
+        <record model="ir.ui.view" id="purchase_order_inherit">
+            <field name="name">purchase.order.inherit</field>
+            <field name="model">purchase.order</field>
+            <field name="inherit_id" ref="purchase.purchase_order_form"/>
+            <field name="arch" type="xml">
+                <xpath expr="//tree/field[@name='taxes_id']" position="attributes">
+                    <attribute name="invisible">True</attribute>
+                </xpath>
+                
+                <xpath expr="//field[@name='amount_untaxed']" position="attributes">
+                    <attribute name="string">Subtotal</attribute>
+                </xpath>
+                <xpath expr="//field[@name='amount_tax']" position="attributes">
+                    <attribute name="invisible">1</attribute>
+                </xpath>
+                
+            </field>
+        </record>
+
+        <record model="ir.ui.view" id="purchase_order_line_inherit">
+            <field name="name">purchase.order.line.inherit</field>
+            <field name="model">purchase.order.line</field>
+            <field name="inherit_id" ref="purchase.purchase_order_line_form"/>
+            <field name="arch" type="xml">
+                <xpath expr="//field[@name='taxes_id']" position="attributes">
+                    <attribute name="invisible">True</attribute>
+                </xpath>
+            </field>
+        </record>
+
+        <record model="ir.ui.view" id="purchase_order_tree_inherit">
+            <field name="name">purchase.order.tree.inherit</field>
+            <field name="model">purchase.order</field>
+            <field name="inherit_id" ref="purchase.purchase_order_tree"/>
+            <field name="arch" type="xml">
+                <xpath expr="//field[@name='amount_untaxed']" position="attributes">
+                    <attribute name="invisible">True</attribute>
+                </xpath>
+            </field>
+        </record>
+
+        <template id="purchase_tax_hide" inherit_id="purchase.report_purchaseorder_document">
+            <xpath expr="//table/thead/tr/th[2]" position="replace"/>
+            <xpath expr="//table/tbody/tr/td[2]" position="replace"/>
+            <xpath expr="//div/div/table/tr[2]" position="replace"/>
+            <xpath expr="//div/div/table/tr[1]" position="replace"/>
+        </template>
+    </data>
+</openerp>
+
+

+ 35 - 0
views/sale_view.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record model="ir.ui.view" id="sale_order_inherit">
+            <field name="name">sale.order.inherit</field>
+            <field name="model">sale.order</field>
+            <field name="inherit_id" ref="sale.view_order_form"/>
+            <field name="arch" type="xml">
+                <data>
+                    <xpath expr="//field[@name='amount_untaxed']" position="attributes">
+                        <attribute name="string">Subtotal</attribute>
+                    </xpath>
+                    
+                    <xpath expr="//field[@name='amount_tax']" position="attributes">
+                        <attribute name="invisible">1</attribute>
+                    </xpath>
+                    
+                    <xpath expr="//field[@name='tax_id']" position="attributes">
+                        <attribute name="invisible">True</attribute>
+                    </xpath>
+                    <xpath expr="//tree/field[@name='tax_id']" position="attributes">
+                        <attribute name="invisible">True</attribute>
+                    </xpath>
+                </data>
+            </field>
+        </record>
+
+        <template id="sale_tax_hide" inherit_id="sale.report_saleorder_document">
+            <xpath expr="//table/thead/tr/th[2]" position="replace"/>
+            <xpath expr="//table/tbody/tr/td[2]" position="replace"/>
+            <xpath expr="//div/div/table/tr[2]" position="replace"/>
+            <xpath expr="//div/div/table/tr[1]" position="replace"/>
+        </template>
+    </data>
+</openerp>