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
This commit is contained in:
P. Christeas
2010-10-28 15:24:10 +03:00
parent 6cc732ae6e
commit f4bfcfb69a
5 changed files with 193 additions and 2 deletions
+2
View File
@@ -21,6 +21,8 @@
##############################################################################
import fiscal_prints
import account_vats
import partner
import account_invoice_print
import ir_actions_report
import wizard
+4 -2
View File
@@ -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
}
@@ -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>
@@ -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
+37
View File
@@ -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