Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] *_tax_hide #192

Open
wants to merge 3 commits into
base: 8.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions account_tax_hide/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

======================
Hide taxes (invoicing)
======================

In many legislations, NOGs and charities are exempt from paying VAT and related taxes.

This module allows you to hide all taxes concerned with invoicing by default and adds a user group for users that do need to work with taxes.

Configuration
=============

By default, taxes are hidden for all users. If you need to re-enable them for some users, add them to the group `Accounting & Finance/Show taxes`

Usage
=====

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/160/8.0

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/vertical-ngo/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.

Credits
=======

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.

Contributors
------------

* Holger Brunn <[email protected]>

Do not contact contributors directly about help with questions or problems concerning this addon, but use the `community mailing list <mailto:[email protected]>`_ or the `appropriate specialized mailinglist <https://odoo-community.org/groups>`_ for help, and the bug tracker linked in `Bug Tracker`_ above for technical issues.

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.
3 changes: 3 additions & 0 deletions account_tax_hide/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
22 changes: 22 additions & 0 deletions account_tax_hide/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Hide taxes (invoicing)",
"version": "8.0.1.0.0",
"author": "Therp BV,Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Accounting & Finance",
"summary": "Hide taxes for most employees",
"depends": [
'account',
],
"data": [
"views/account_move.xml",
"views/account_move_line.xml",
"security/res_groups.xml",
"data/ir_ui_menu.xml",
"views/product_template.xml",
"views/account_invoice.xml",
],
}
17 changes: 17 additions & 0 deletions account_tax_hide/data/ir_ui_menu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="account.account_template_taxes" model="ir.ui.menu">
<field name="groups_id" eval="[(4, ref('group_show_taxes'))]" />
</record>
<record id="account.menu_tax_report" model="ir.ui.menu">
<field name="groups_id" eval="[(4, ref('group_show_taxes'))]" />
</record>
<record id="account.next_id_27" model="ir.ui.menu">
<field name="groups_id" eval="[(4, ref('group_show_taxes'))]" />
</record>
<record id="account.menu_action_tax_code_tree" model="ir.ui.menu">
<field name="groups_id" eval="[(4, ref('group_show_taxes'))]" />
</record>
</data>
</openerp>
9 changes: 9 additions & 0 deletions account_tax_hide/security/res_groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="group_show_taxes" model="res.groups">
<field name="category_id" ref="base.module_category_accounting_and_finance" />
<field name="name">Show taxes</field>
</record>
</data>
</openerp>
Binary file added account_tax_hide/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions account_tax_hide/views/account_invoice.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="invoice_form" model="ir.ui.view">
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form" />
<field name="arch" type="xml">
<field name="invoice_line_tax_id" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</field>
<field name="amount_tax" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</field>
<field name="tax_line" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</field>
<field name="fiscal_position" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</field>
<xpath expr="//field[@name='amount_tax']/preceding-sibling::div[1]" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</xpath>
</field>
</record>
<record id="invoice_supplier_form" model="ir.ui.view">
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form" />
<field name="arch" type="xml">
<field name="invoice_line_tax_id" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</field>
<field name="amount_tax" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</field>
<xpath expr="//field[@name='tax_line']/ancestor::div[1]" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</xpath>
<xpath expr="//field[@name='amount_tax']/preceding-sibling::div[1]" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</xpath>
<field name="fiscal_position" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</field>
</field>
</record>
</data>
</openerp>
20 changes: 20 additions & 0 deletions account_tax_hide/views/account_move.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="view_move_form" model="ir.ui.view">
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='tax_code_id']/parent::group" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</xpath>
<xpath expr="//field[@name='line_id']/tree/field[@name='tax_code_id']" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</xpath>
<xpath expr="//field[@name='line_id']/tree/field[@name='tax_amount']" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</xpath>
</field>
</record>
</data>
</openerp>
14 changes: 14 additions & 0 deletions account_tax_hide/views/account_move_line.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="view_move_line_form" model="ir.ui.view">
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='tax_code_id']/parent::group" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</xpath>
</field>
</record>
</data>
</openerp>
17 changes: 17 additions & 0 deletions account_tax_hide/views/product_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="product_template_form_view" model="ir.ui.view">
<field name="model">product.template</field>
<field name="inherit_id" ref="account.product_template_form_view" />
<field name="arch" type="xml">
<field name="taxes_id" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</field>
<field name="supplier_taxes_id" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</field>
</field>
</record>
</data>
</openerp>
61 changes: 61 additions & 0 deletions sale_tax_hide/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

==========
Hide taxes
==========

In many legislations, NOGs and charities are exempt from paying VAT and related taxes.

This module allows you to hide all taxes concerned with sales by default and adds a user group for users that do need to work with taxes.

Configuration
=============

By default, taxes are hidden for all users. If you need to re-enable them for some users, add them to the group `Accounting & Finance/Show taxes`

Usage
=====

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/160/8.0

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/vertical-ngo/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.

Credits
=======

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.

Contributors
------------

* Holger Brunn <[email protected]>

Do not contact contributors directly about help with questions or problems concerning this addon, but use the `community mailing list <mailto:[email protected]>`_ or the `appropriate specialized mailinglist <https://odoo-community.org/groups>`_ for help, and the bug tracker linked in `Bug Tracker`_ above for technical issues.

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.
3 changes: 3 additions & 0 deletions sale_tax_hide/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
18 changes: 18 additions & 0 deletions sale_tax_hide/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Hide taxes (sales)",
"version": "8.0.1.0.0",
"author": "Therp BV,Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Accounting & Finance",
"summary": "Hide taxes for most employees",
"depends": [
'sale',
'account_tax_hide',
],
"data": [
"views/sale_order.xml",
],
}
Binary file added sale_tax_hide/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions sale_tax_hide/views/sale_order.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="view_order_form" model="ir.ui.view">
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/form//field[@name='tax_id']" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='tax_id']" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</xpath>
<field name="fiscal_position">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</field>
<field name="amount_tax" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</field>
<field name="amount_untaxed" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</field>
<field name="fiscal_position" position="attributes">
<attribute name="groups">account_tax_hide.group_show_taxes</attribute>
</field>
</field>
</record>
</data>
</openerp>