Launchpad automatic translations update.
[odoo/odoo.git] / addons / l10n_it / libroIVA.py
1 # -*- encoding: utf-8 -*-
2 ##############################################################################
3 #
4 #    OpenERP, Open Source Management Solution
5 #    Copyright (C) 2010
6 #    Italian OpenERP Community (<http://www.openerp-italia.com>)
7 #    Servabit srl
8 #    Agile Business Group sagl
9 #    Domsense srl
10 #
11 #    This program is free software: you can redistribute it and/or modify
12 #    it under the terms of the GNU Affero General Public License as
13 #    published by the Free Software Foundation, either version 3 of the
14 #    License, or (at your option) any later version.
15 #
16 #    This program is distributed in the hope that it will be useful,
17 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
18 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 #    GNU Affero General Public License for more details.
20 #
21 #    You should have received a copy of the GNU Affero General Public License
22 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
23 #
24 ##############################################################################
25
26
27 # ##################################################################################
28 # Questa vista SQL viene usata solo per far scegliere l'anno di pianificazione all'utente
29 # Viene infatti costruita una vista XML di tipo tree che contiene solo i diversi anni per i quali stata fatta almeno una pianificazione
30 # ##################################################################################
31
32 from osv import fields, osv
33
34 class l10n_chart_it_report_libroIVA (osv.osv):
35     _name = "account.report_libroiva"
36     _description = "SQL view for libro IVA"
37     _auto = False
38     _rec_name = "name"
39     #_order = "fiscal_year";
40
41     _columns = {
42         'name': fields.char('Fiscal year',size=64),
43         'company_id': fields.many2one('res.company', 'Company'),
44     }
45
46     def init (self, cr) :
47         cr.execute("""DROP VIEW IF EXISTS account_report_libroiva""")
48         cr.execute("""
49                 CREATE VIEW account_report_libroiva AS (
50                         SELECT  id, name, company_id FROM account_fiscalyear
51         )""")
52 l10n_chart_it_report_libroIVA()
53
54