1 # -*- encoding: utf-8 -*-
2 ##############################################################################
4 # OpenERP, Open Source Management Solution
6 # Italian OpenERP Community (<http://www.openerp-italia.com>)
8 # Agile Business Group sagl
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.
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.
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/>.
24 ##############################################################################
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 # ##################################################################################
32 from osv import fields, osv
34 class l10n_chart_it_report_libroIVA (osv.osv):
35 _name = "account.report_libroiva"
36 _description = "SQL view for libro IVA"
39 #_order = "fiscal_year";
42 'name': fields.char('Fiscal year',size=64),
43 'company_id': fields.many2one('res.company', 'Company'),
47 cr.execute("""DROP VIEW IF EXISTS account_report_libroiva""")
49 CREATE VIEW account_report_libroiva AS (
50 SELECT id, name, company_id FROM account_fiscalyear
52 l10n_chart_it_report_libroIVA()