summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorP. Christeas <p_christ@hol.gr>2010-10-28 15:24:10 +0300
committerP. Christeas <p_christ@hol.gr>2010-10-28 15:24:10 +0300
commitf4bfcfb69a0b1d9d48845e30b67b1af9dcdb7ca4 (patch)
treef0f90ebc2c058fd18b161e7d9cbd44e7e9f382da
parent6cc732ae6e10ca6708b07253c335a979b4757da4 (diff)
Greek fiscal: add VAT authorities, occupation.
In Greece, the VAT number alone is not sufficient for an invoice. bzr revid: p_christ@hol.gr-20101028122410-w7mtalliboz1tttl
-rw-r--r--addons/account_greek_fiscal/__init__.py2
-rw-r--r--addons/account_greek_fiscal/__terp__.py6
-rw-r--r--addons/account_greek_fiscal/account_fiscalgr_vats.xml98
-rw-r--r--addons/account_greek_fiscal/account_vats.py52
-rw-r--r--addons/account_greek_fiscal/partner.py37
5 files changed, 193 insertions, 2 deletions
diff --git a/addons/account_greek_fiscal/__init__.py b/addons/account_greek_fiscal/__init__.py
index bde4b31195c..52068cf0afe 100644
--- a/addons/account_greek_fiscal/__init__.py
+++ b/addons/account_greek_fiscal/__init__.py
@@ -21,6 +21,8 @@
##############################################################################
import fiscal_prints
+import account_vats
+import partner
import account_invoice_print
import ir_actions_report
import wizard
diff --git a/addons/account_greek_fiscal/__terp__.py b/addons/account_greek_fiscal/__terp__.py
index 896a746b23d..cf7d86ac861 100644
--- a/addons/account_greek_fiscal/__terp__.py
+++ b/addons/account_greek_fiscal/__terp__.py
@@ -34,8 +34,10 @@
],
"demo_xml" : [
],
- "update_xml" : [ "account_fiscalgr_view.xml", "account_invoice_report.xml"
- ],
+ "update_xml" : [ "account_fiscalgr_vats.xml",
+ "account_fiscalgr_view.xml",
+ "account_invoice_report.xml"
+ ],
"active": False,
"installable": True
}
diff --git a/addons/account_greek_fiscal/account_fiscalgr_vats.xml b/addons/account_greek_fiscal/account_fiscalgr_vats.xml
new file mode 100644
index 00000000000..5ea2b7c4a93
--- /dev/null
+++ b/addons/account_greek_fiscal/account_fiscalgr_vats.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0"?>
+<openerp>
+ <data>
+ <record model="ir.ui.view" id="view_account_ficalgr_tauth_form">
+ <field name="name">account.fiscalgr.tauth.form</field>
+ <field name="model">account.fiscalgr.tauth</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Tax authorities">
+ <field name="name" colspan="2" search="1"/>
+ <field name="code" search="1"/>
+ <field name="country_id" />
+ <field name="descr" colspan="4" />
+ </form>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_account_ficalgr_tauth_tree">
+ <field name="name">account.fiscalgr.tauth.tree</field>
+ <field name="model">account.fiscalgr.tauth</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Tax authorities">
+ <field name="name" search="1"/>
+ <field name="code" search="1"/>
+ <field name="country_id" search="1" />
+ </tree>
+ </field>
+ </record>
+
+
+ <record model="ir.actions.act_window" id="view_account_fiscalgr_tauth_tf">
+ <field name="name">Tax authorities</field>
+ <field name="res_model">account.fiscalgr.tauth</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ </record>
+
+ <!-- Tax occupations -->
+ <record model="ir.ui.view" id="view_account_ficalgr_occup_form">
+ <field name="name">account.fiscalgr.occup.form</field>
+ <field name="model">account.fiscalgr.occup</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Tax occupations">
+ <field name="name" colspan="2" search="1"/>
+ <field name="code" search="1"/>
+ <field name="descr" colspan="4" />
+ </form>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_account_ficalgr_occup_tree">
+ <field name="name">account.fiscalgr.occup.tree</field>
+ <field name="model">account.fiscalgr.occup</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Tax occupations">
+ <field name="name" search="1"/>
+ <field name="code" search="1"/>
+ </tree>
+ </field>
+ </record>
+
+
+ <record model="ir.actions.act_window" id="view_account_fiscalgr_occup_tf">
+ <field name="name">Tax occupations</field>
+ <field name="res_model">account.fiscalgr.occup</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ </record>
+
+
+ <menuitem name="Tax authorities" id="menu_account_fiscalgr_tauth_tf"
+ action="view_account_fiscalgr_tauth_tf"
+ parent="account.menu_finance_accounting"/>
+
+ <menuitem name="Tax occupations" id="menu_account_fiscalgr_occup_tf"
+ action="view_account_fiscalgr_occup_tf"
+ parent="account.menu_finance_accounting"/>
+
+
+ <record model="ir.ui.view" id="view_partner_fiscalgr_inherit_1">
+ <field name="name">account.partner.fiscalgr.inherit_1</field>
+ <field name="model">res.partner</field>
+ <field name="inherit_id" ref="base_vat.view_partner_form"/>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <xpath expr="/form/notebook/page[@name='Accounting']/group/field[@name='vat']" position="after">
+ <field name="vat_taxauth"/>
+ <field name="vat_occup" />
+ </xpath>
+ </field>
+ </record>
+
+
+ </data>
+</openerp> \ No newline at end of file
diff --git a/addons/account_greek_fiscal/account_vats.py b/addons/account_greek_fiscal/account_vats.py
new file mode 100644
index 00000000000..0c08bf09a48
--- /dev/null
+++ b/addons/account_greek_fiscal/account_vats.py
@@ -0,0 +1,52 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2009 P. Christeas. All Rights Reserved
+#
+# This program is free software: you can redistribute it and/or modify
+# 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import netsvc
+from osv import osv, fields
+
+class account_fiscalgr_tauth(osv.osv):
+ _name = 'account.fiscalgr.tauth'
+ _inherit = ''
+ _columns = {
+ 'name': fields.char('Name',size=120,required=True ),
+ 'country_id': fields.many2one('res.country', 'Country', required=True),
+ 'code': fields.char('Code',size=30),
+ 'descr': fields.text('Description',help="Any notes for this authority"),
+ }
+ _defaults = {
+ }
+
+account_fiscalgr_tauth()
+
+class account_fiscalgr_occup(osv.osv):
+ _name = 'account.fiscalgr.occup'
+ _inherit = ''
+ _columns = {
+ 'name': fields.char('Name',size=120,required=True ),
+ 'code': fields.char('Code',size=30),
+ 'descr': fields.text('Description'),
+ }
+ _defaults = {
+ }
+
+account_fiscalgr_occup()
+
+#eof
diff --git a/addons/account_greek_fiscal/partner.py b/addons/account_greek_fiscal/partner.py
new file mode 100644
index 00000000000..0e1f38bf762
--- /dev/null
+++ b/addons/account_greek_fiscal/partner.py
@@ -0,0 +1,37 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2009 P. Christeas. All Rights Reserved
+#
+# This program is free software: you can redistribute it and/or modify
+# 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import netsvc
+from osv import osv, fields
+
+class res_partner(osv.osv):
+ _inherit = 'res.partner'
+ _columns = {
+ 'vat_taxauth': fields.many2one('account.fiscalgr.tauth','Tax authority',
+ domain=[('country_id','=','country_id')],
+ help="Select the local tax service branch, where the partner is registered."),
+ 'vat_occup': fields.many2one('account.fiscalgr.occup','VAT Occupation',
+ help="Select the corresponding occupation of the partner, as registered with tax authorities."),
+ }
+
+res_partner()
+
+#eof