eLBati
2011-08-30 10:55:33 +02:00
parent f0597f3686
commit aebad6a8ee
17 changed files with 147 additions and 1730 deletions
+6 -5
View File
@@ -1,13 +1,15 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010
# Italian OpenERP Community (<http://www.openerp-italia.com>)
# OpenERP Italian Community (<http://www.openerp-italia.org>)
# Servabit srl
# Agile Business Group sagl
# Domsense srl
# Albatos srl
# Albatos srl
#
# Copyright (C) 2011
# Associazione OpenERP Italia (<http://www.openerp-italia.org>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -24,5 +26,4 @@
#
##############################################################################
import libroIVA
import report
import account
+4 -5
View File
@@ -3,12 +3,15 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010
# Italian OpenERP Community (<http://www.openerp-italia.org>)
# OpenERP Italian Community (<http://www.openerp-italia.org>)
# Servabit srl
# Agile Business Group sagl
# Domsense srl
# Albatos srl
#
# Copyright (C) 2011
# Associazione OpenERP Italia (<http://www.openerp-italia.org>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
@@ -39,9 +42,6 @@ Italian accounting chart and localization.
"category" : "Finance",
'website': 'http://www.openerp-italia.org/',
'init_xml': [
'report.xml',
'libroIVA_view.xml',
'libroIVA_menu.xml',
],
'update_xml': [
'data/account.account.type.csv',
@@ -51,7 +51,6 @@ Italian accounting chart and localization.
'data/account.tax.template.csv',
'data/account.fiscal.position.template.csv',
'l10n_chart_it_generic.xml',
'security/ir.model.access.csv',
],
'demo_xml': [
],
+56
View File
@@ -0,0 +1,56 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011
# Associazione OpenERP Italia (<http://www.openerp-italia.org>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
import decimal_precision as dp
from decimal import *
class account_tax(osv.osv):
_inherit = 'account.tax'
def compute_all(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None):
res = super(account_tax, self).compute_all(cr, uid, taxes, price_unit, quantity, address_id, product, partner)
precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
tax_list = res['taxes']
totalex = res['total']
if len(tax_list) == 2:
for tax in tax_list:
if tax.get('balance',False): # Calcolo di imponibili e imposte per l'IVA parzialmente detraibile
deductible_base = totalex
ind_tax = tax_list[abs(tax_list.index(tax)-1)]
ind_tax_obj = self.browse(cr, uid, ind_tax['id'])
ded_tax_obj = self.browse(cr, uid, tax['id'])
base_ind = float(Decimal(str(totalex * ind_tax_obj.amount)).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP))
base_ded = float(Decimal(str(totalex - base_ind)).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP))
tax_total = float(Decimal(str(tax['balance'])).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP))
tax_ind = float(Decimal(str(tax_total * ind_tax_obj.amount)).quantize(Decimal('1.'+precision*'0'), rounding=ROUND_HALF_UP))
tax_ded = tax_total - tax_ind
ind_tax['price_unit'] = base_ind
tax['price_unit'] = base_ded
ind_tax['amount'] = tax_ind
tax['amount'] = tax_ded
return res
account_tax()
+46 -40
View File
@@ -1,40 +1,46 @@
"id","description","chart_template_id:id","name","amount","parent_id:id","child_depend","type","account_collected_id:id","account_paid_id:id","type_tax_use","base_code_id:id","tax_code_id:id","ref_base_code_id:id","ref_tax_code_id:id"
"20a","20a","l10n_it_chart_template_generic","Iva al 20% (debito)","0.2",,"False","percent","2601","2601","sale","template_impcode_riscossa_20","template_ivacode_riscossa_20","template_impcode_riscossa_20","template_ivacode_riscossa_20"
"20b","20b","l10n_it_chart_template_generic","Iva al 20% (credito)","0.2",,"False","percent","1601","1601","purchase","template_impcode_pagata_20","template_ivacode_pagata_20","template_impcode_pagata_20","template_ivacode_pagata_20"
"10a","10a","l10n_it_chart_template_generic","Iva al 10% (debito)","0.1",,"False","percent","2601","2601","sale","template_impcode_riscossa_10","template_ivacode_riscossa_10","template_impcode_riscossa_10","template_ivacode_riscossa_10"
"10b","10b","l10n_it_chart_template_generic","Iva al 10% (credito)","0.1",,"False","percent","1601","1601","purchase","template_impcode_pagata_10","template_ivacode_pagata_10","template_impcode_pagata_10","template_ivacode_pagata_10"
"10AO","10AO","l10n_it_chart_template_generic","Iva al 10% indetraibile","1",,"True","percent",,,"purchase",,,,
"10AOa","10AOa","l10n_it_chart_template_generic","Iva al 10% indetraibile (1)","0","10AO","False","percent","1601","1601","purchase","template_impcode_pagata_10ind","template_ivacode_pagata_10ind","template_impcode_pagata_10ind","template_ivacode_pagata_10ind"
"10AOb","10AOb","l10n_it_chart_template_generic","Iva al 10% indetraibile (2)","0.1","10AO","False","percent",,,"purchase",,,,
"12a","12a","l10n_it_chart_template_generic","Iva 12% (debito)","0.12",,"False","percent","2601","2601","sale","template_impcode_riscossa_12","template_ivacode_riscossa_12","template_impcode_riscossa_12","template_ivacode_riscossa_12"
"12b","12b","l10n_it_chart_template_generic","Iva 12% (credito)","0.12",,"False","percent","1601","1601","purchase","template_impcode_pagata_12","template_ivacode_pagata_12","template_impcode_pagata_12","template_ivacode_pagata_12"
"2010","2010","l10n_it_chart_template_generic","Iva al 20% detraibile 10%","1",,"True","percent",,,"purchase",,,,
"2010a","2010a","l10n_it_chart_template_generic","Iva al 20% detraibile 10% (1)","0.02","2010","False","percent","1601","1601","purchase","template_impcode_pagata_20det10","template_ivacode_pagata_20det10","template_impcode_pagata_20det10","template_ivacode_pagata_20det10"
"2010b","2010b","l10n_it_chart_template_generic","Iva al 20% detraibile 10% (2)","0.18","2010","False","percent",,,"purchase",,,,
"2015","2015","l10n_it_chart_template_generic","Iva al 20% detraibile 15%","1",,"True","percent",,,"purchase",,,,
"2015a","2015a","l10n_it_chart_template_generic","Iva al 20% detraibile 15% (1)","0.03","2015","False","percent","1601","1601","purchase","template_impcode_pagata_20det15","template_ivacode_pagata_20det15","template_impcode_pagata_20det15","template_ivacode_pagata_20det15"
"2015b","2015b","l10n_it_chart_template_generic","Iva al 20% detraibile 15% (2)","0.17","2015","False","percent",,,"purchase",,,,
"2040","2040","l10n_it_chart_template_generic","Iva al 20% detraibile 40%","1",,"True","percent",,,"purchase",,,,
"2040a","2040a","l10n_it_chart_template_generic","Iva al 20% detraibile 40% (1)","0.08","2040","False","percent","1601","1601","purchase","template_impcode_pagata_20det40","template_ivacode_pagata_20det40","template_impcode_pagata_20det40","template_ivacode_pagata_20det40"
"2040b","2040b","l10n_it_chart_template_generic","Iva al 20% detraibile 40% (2)","0.12","2040","False","percent",,,"purchase",,,,
"20AO","20AO","l10n_it_chart_template_generic","Iva al 20% indetraibile","1",,"True","percent",,,"purchase",,,,
"20AOa","20AOa","l10n_it_chart_template_generic","Iva al 20% indetraibile (1)","0","20AO","False","percent","1601","1601","purchase","template_impcode_pagata_20ind","template_ivacode_pagata_20ind","template_impcode_pagata_20ind","template_ivacode_pagata_20ind"
"20AOb","20AOb","l10n_it_chart_template_generic","Iva al 20% indetraibile (2)","0.2","20AO","False","percent",,,"purchase",,,,
"20I5","20I5","l10n_it_chart_template_generic","IVA al 20% detraibile al 50%","1",,"True","percent",,,"purchase",,,,
"20I5a","20I5a","l10n_it_chart_template_generic","IVA al 20% detraibile al 50% (1)","0.1","20I5","False","percent","1601","1601","purchase","template_impcode_pagata_20det50","template_ivacode_pagata_20det50","template_impcode_pagata_20det50","template_ivacode_pagata_20det50"
"20I5b","20I5b","l10n_it_chart_template_generic","IVA al 20% detraibile al 50% (2)","0.1","20I5","False","percent",,,"purchase",,,,
"22a","22a","l10n_it_chart_template_generic","Iva 2% (debito)","0.02",,"False","percent","2601","2601","sale","template_impcode_riscossa_2","template_ivacode_riscossa_2","template_impcode_riscossa_2","template_ivacode_riscossa_2"
"22b","22b","l10n_it_chart_template_generic","Iva 2% (credito)","0.02",,"False","percent","1601","1601","purchase","template_impcode_pagata_2","template_ivacode_pagata_2","template_impcode_pagata_2","template_ivacode_pagata_2"
"4a","4a","l10n_it_chart_template_generic","Iva 4% (debito)","0.04",,"False","percent","2601","2601","sale","template_impcode_riscossa_4","template_ivacode_riscossa_4","template_impcode_riscossa_4","template_ivacode_riscossa_4"
"4b","4b","l10n_it_chart_template_generic","Iva 4% (credito)","0.04",,"False","percent","1601","1601","purchase","template_impcode_pagata_4","template_ivacode_pagata_4","template_impcode_pagata_4","template_ivacode_pagata_4"
"4AO","4AO","l10n_it_chart_template_generic","Iva al 4% indetraibile","1",,"True","percent",,,"purchase",,,,
"4AOa","4AOa","l10n_it_chart_template_generic","Iva al 4% indetraibile (1)","0","4AO","False","percent","1601","1601","purchase","template_impcode_pagata_4ind","template_ivacode_pagata_4ind","template_impcode_pagata_4ind","template_ivacode_pagata_4ind"
"4AOb","4AOb","l10n_it_chart_template_generic","Iva al 4% indetraibile (2)","0.04","4AO","False","percent",,,"purchase",,,,
"10I5","10I5","l10n_it_chart_template_generic","IVA al 10% detraibile al 50%","1",,"True","percent",,,"purchase",,,,
"10I5a","10I5a","l10n_it_chart_template_generic","IVA al 10% detraibile al 50% (1)","0.05","10I5","False","percent","1601","1601","purchase","template_impcode_pagata_10det50","template_ivacode_pagata_10det50","template_impcode_pagata_10det50","template_ivacode_pagata_10det50"
"10I5b","10I5b","l10n_it_chart_template_generic","IVA al 10% detraibile al 50% (2)","0.05","10I5","False","percent",,,"purchase",,,,
"4I5","4I5","l10n_it_chart_template_generic","IVA al 4% detraibile al 50%","1",,"True","percent",,,"purchase",,,,
"4I5a","4I5a","l10n_it_chart_template_generic","IVA al 4% detraibile al 50% (1)","0.02","4I5","False","percent","1601","1601","purchase","template_impcode_pagata_4det50","template_ivacode_pagata_4det50","template_impcode_pagata_4det50","template_ivacode_pagata_4det50"
"4I5b","4I5b","l10n_it_chart_template_generic","IVA al 4% detraibile al 50% (2)","0.02","4I5","False","percent",,,"purchase",,,,
"00a","00a","l10n_it_chart_template_generic","Esente IVA (debito)","0",,"False","percent","2601","2601","sale","template_impcode_riscossa_0","template_ivacode_riscossa_0","template_impcode_riscossa_0","template_ivacode_riscossa_0"
"00b","00b","l10n_it_chart_template_generic","Esente IVA (credito)","0",,"False","percent","1601","1601","purchase","template_impcode_pagata_0","template_ivacode_pagata_0","template_impcode_pagata_0","template_ivacode_pagata_0"
"id","description","chart_template_id:id","name","sequence","amount","parent_id:id","child_depend","type","account_collected_id:id","account_paid_id:id","type_tax_use","base_code_id:id","tax_code_id:id","ref_base_code_id:id","ref_tax_code_id:id","ref_base_sign","ref_tax_sign","price_include"
"20a","20a","l10n_it_chart_template_generic","Iva al 20% (debito)",,"0.2",,"False","percent","2601","2601","sale","template_impcode_riscossa_20","template_ivacode_riscossa_20","template_impcode_riscossa_20","template_ivacode_riscossa_20",-1,-1,"False"
"20b","20b","l10n_it_chart_template_generic","Iva al 20% (credito)",,"0.2",,"False","percent","1601","1601","purchase","template_impcode_pagata_20","template_ivacode_pagata_20","template_impcode_pagata_20","template_ivacode_pagata_20",-1,-1,"False"
"10a","10a","l10n_it_chart_template_generic","Iva al 10% (debito)",,"0.1",,"False","percent","2601","2601","sale","template_impcode_riscossa_10","template_ivacode_riscossa_10","template_impcode_riscossa_10","template_ivacode_riscossa_10",-1,-1,"False"
"10b","10b","l10n_it_chart_template_generic","Iva al 10% (credito)",,"0.1",,"False","percent","1601","1601","purchase","template_impcode_pagata_10","template_ivacode_pagata_10","template_impcode_pagata_10","template_ivacode_pagata_10",-1,-1,"False"
"10AO","10AO","l10n_it_chart_template_generic","Iva al 10% indetraibile",,"0.1",,"True","percent",,,"purchase","template_impcode_pagata_10ind",,"template_impcode_pagata_10ind",,-1,,"False"
"10AOa","10AOa","l10n_it_chart_template_generic","Iva al 10% indetraibile (D)","2","0","10AO","False","balance","1601","1601","purchase",,"template_ivacode_pagata_10ind",,"template_ivacode_pagata_10ind",,-1,"False"
"10AOb","10AOb","l10n_it_chart_template_generic","Iva al 10% indetraibile (I)","1","1","10AO","False","percent",,,"purchase",,,,,,,"False"
"12a","12a","l10n_it_chart_template_generic","Iva 12% (debito)",,"0.12",,"False","percent","2601","2601","sale","template_impcode_riscossa_12","template_ivacode_riscossa_12","template_impcode_riscossa_12","template_ivacode_riscossa_12",-1,-1,"False"
"12b","12b","l10n_it_chart_template_generic","Iva 12% (credito)",,"0.12",,"False","percent","1601","1601","purchase","template_impcode_pagata_12","template_ivacode_pagata_12","template_impcode_pagata_12","template_ivacode_pagata_12",-1,-1,"False"
"2010","2010","l10n_it_chart_template_generic","Iva al 20% detraibile 10%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det10",,"template_impcode_pagata_20det10",,-1,,"False"
"2010a","2010a","l10n_it_chart_template_generic","Iva al 20% detraibile 10% (D)","2","0","2010","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det10",,"template_ivacode_pagata_20det10",,-1,"False"
"2010b","2010b","l10n_it_chart_template_generic","Iva al 20% detraibile 10% (I)","1","0.9","2010","False","percent",,,"purchase",,,,,,,"False"
"2015","2015","l10n_it_chart_template_generic","Iva al 20% detraibile 15%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det15",,"template_impcode_pagata_20det15",,-1,,"False"
"2015a","2015a","l10n_it_chart_template_generic","Iva al 20% detraibile 15% (D)","2","0","2015","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det15",,"template_ivacode_pagata_20det15",,-1,"False"
"2015b","2015b","l10n_it_chart_template_generic","Iva al 20% detraibile 15% (I)","1","0.85","2015","False","percent",,,"purchase",,,,,,,"False"
"2040","2040","l10n_it_chart_template_generic","Iva al 20% detraibile 40%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det40",,"template_impcode_pagata_20det40",,-1,,"False"
"2040a","2040a","l10n_it_chart_template_generic","Iva al 20% detraibile 40% (D)","2","0","2040","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det40",,"template_ivacode_pagata_20det40",,-1,"False"
"2040b","2040b","l10n_it_chart_template_generic","Iva al 20% detraibile 40% (I)","1","0.6","2040","False","percent",,,"purchase",,,,,,,"False"
"20AO","20AO","l10n_it_chart_template_generic","Iva al 20% indetraibile",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20ind",,"template_impcode_pagata_20ind",,-1,,"False"
"20AOa","20AOa","l10n_it_chart_template_generic","Iva al 20% indetraibile (D)","2","0","20AO","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20ind",,"template_ivacode_pagata_20ind",,-1,"False"
"20AOb","20AOb","l10n_it_chart_template_generic","Iva al 20% indetraibile (I)","1","1","20AO","False","percent",,,"purchase",,,,,,,"False"
"20I5","20I5","l10n_it_chart_template_generic","IVA al 20% detraibile al 50%",,"0.2",,"True","percent",,,"purchase","template_impcode_pagata_20det50",,"template_impcode_pagata_20det50",,-1,,"False"
"20I5b","20I5b","l10n_it_chart_template_generic","IVA al 20% detraibile al 50% (I)","1","0.5","20I5","False","percent",,,"purchase",,,,,,,"False"
"20I5a","20I5a","l10n_it_chart_template_generic","IVA al 20% detraibile al 50% (D)","2","0","20I5","False","balance","1601","1601","purchase",,"template_ivacode_pagata_20det50",,"template_ivacode_pagata_20det50",,-1,"False"
"22a","22a","l10n_it_chart_template_generic","Iva 2% (debito)",,"0.02",,"False","percent","2601","2601","sale","template_impcode_riscossa_2","template_ivacode_riscossa_2","template_impcode_riscossa_2","template_ivacode_riscossa_2",-1,-1,"False"
"22b","22b","l10n_it_chart_template_generic","Iva 2% (credito)",,"0.02",,"False","percent","1601","1601","purchase","template_impcode_pagata_2","template_ivacode_pagata_2","template_impcode_pagata_2","template_ivacode_pagata_2",-1,-1,"False"
"4a","4a","l10n_it_chart_template_generic","Iva 4% (debito)",,"0.04",,"False","percent","2601","2601","sale","template_impcode_riscossa_4","template_ivacode_riscossa_4","template_impcode_riscossa_4","template_ivacode_riscossa_4",-1,-1,"False"
"4b","4b","l10n_it_chart_template_generic","Iva 4% (credito)",,"0.04",,"False","percent","1601","1601","purchase","template_impcode_pagata_4","template_ivacode_pagata_4","template_impcode_pagata_4","template_ivacode_pagata_4",-1,-1,"False"
"4AO","4AO","l10n_it_chart_template_generic","Iva al 4% indetraibile",,"0.04",,"True","percent",,,"purchase","template_impcode_pagata_4ind",,"template_impcode_pagata_4ind",,-1,,"False"
"4AOa","4AOa","l10n_it_chart_template_generic","Iva al 4% indetraibile (D)","2","0","4AO","False","balance","1601","1601","purchase",,"template_ivacode_pagata_4ind",,"template_ivacode_pagata_4ind",,-1,"False"
"4AOb","4AOb","l10n_it_chart_template_generic","Iva al 4% indetraibile (I)","1","1","4AO","False","percent",,,"purchase",,,,,,,"False"
"10I5","10I5","l10n_it_chart_template_generic","IVA al 10% detraibile al 50%",,"0.1",,"True","percent",,,"purchase","template_impcode_pagata_10det50",,"template_impcode_pagata_10det50",,-1,,"False"
"10I5a","10I5a","l10n_it_chart_template_generic","IVA al 10% detraibile al 50% (D)","2","0","10I5","False","balance","1601","1601","purchase",,"template_ivacode_pagata_10det50",,"template_ivacode_pagata_10det50",,-1,"False"
"10I5b","10I5b","l10n_it_chart_template_generic","IVA al 10% detraibile al 50% (I)","1","0.5","10I5","False","percent",,,"purchase",,,,,,,"False"
"4I5","4I5","l10n_it_chart_template_generic","IVA al 4% detraibile al 50%",,"0.04",,"True","percent",,,"purchase","template_impcode_pagata_4det50",,"template_impcode_pagata_4det50",,-1,,"False"
"4I5a","4I5a","l10n_it_chart_template_generic","IVA al 4% detraibile al 50% (D)","2","0","4I5","False","balance","1601","1601","purchase",,"template_ivacode_pagata_4det50",,"template_ivacode_pagata_4det50",,-1,"False"
"4I5b","4I5b","l10n_it_chart_template_generic","IVA al 4% detraibile al 50% (I)","1","0.5","4I5","False","percent",,,"purchase",,,,,,,"False"
"00a","00a","l10n_it_chart_template_generic","Esente IVA (debito)",,"0",,"False","percent","2601","2601","sale","template_impcode_riscossa_0","template_ivacode_riscossa_0","template_impcode_riscossa_0","template_ivacode_riscossa_0",-1,-1,"False"
"00b","00b","l10n_it_chart_template_generic","Esente IVA (credito)",,"0",,"False","percent","1601","1601","purchase","template_impcode_pagata_0","template_ivacode_pagata_0","template_impcode_pagata_0","template_ivacode_pagata_0",-1,-1,"False"
"20a INC","20a INC","l10n_it_chart_template_generic","Iva al 20% (debito) INC",,"0.2",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_20","l10n_it.template_ivacode_riscossa_20","l10n_it.template_impcode_riscossa_20","l10n_it.template_ivacode_riscossa_20",-1,-1,"True"
"10a INC","10a INC","l10n_it_chart_template_generic","Iva al 10% (debito) INC",,"0.1",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_10","l10n_it.template_ivacode_riscossa_10","l10n_it.template_impcode_riscossa_10","l10n_it.template_ivacode_riscossa_10",-1,-1,"True"
"12a INC","12a INC","l10n_it_chart_template_generic","Iva 12% (debito) INC",,"0.12",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_12","l10n_it.template_ivacode_riscossa_12","l10n_it.template_impcode_riscossa_12","l10n_it.template_ivacode_riscossa_12",-1,-1,"True"
"22a INC","22a INC","l10n_it_chart_template_generic","Iva 2% (debito) INC",,"0.02",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_2","l10n_it.template_ivacode_riscossa_2","l10n_it.template_impcode_riscossa_2","l10n_it.template_ivacode_riscossa_2",-1,-1,"True"
"4a INC","4a INC","l10n_it_chart_template_generic","Iva 4% (debito) INC",,"0.04",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_4","l10n_it.template_ivacode_riscossa_4","l10n_it.template_impcode_riscossa_4","l10n_it.template_ivacode_riscossa_4",-1,-1,"True"
"00a INC","00a INC","l10n_it_chart_template_generic","Esente IVA (debito) INC",,"0",,"False","percent","l10n_it.2601","l10n_it.2601","sale","l10n_it.template_impcode_riscossa_0","l10n_it.template_ivacode_riscossa_0","l10n_it.template_impcode_riscossa_0","l10n_it.template_ivacode_riscossa_0",-1,-1,"True"
1 id description chart_template_id:id name sequence amount parent_id:id child_depend type account_collected_id:id account_paid_id:id type_tax_use base_code_id:id tax_code_id:id ref_base_code_id:id ref_tax_code_id:id ref_base_sign ref_tax_sign price_include
2 20a 20a l10n_it_chart_template_generic Iva al 20% (debito) 0.2 False percent 2601 2601 sale template_impcode_riscossa_20 template_ivacode_riscossa_20 template_impcode_riscossa_20 template_ivacode_riscossa_20 -1 -1 False
3 20b 20b l10n_it_chart_template_generic Iva al 20% (credito) 0.2 False percent 1601 1601 purchase template_impcode_pagata_20 template_ivacode_pagata_20 template_impcode_pagata_20 template_ivacode_pagata_20 -1 -1 False
4 10a 10a l10n_it_chart_template_generic Iva al 10% (debito) 0.1 False percent 2601 2601 sale template_impcode_riscossa_10 template_ivacode_riscossa_10 template_impcode_riscossa_10 template_ivacode_riscossa_10 -1 -1 False
5 10b 10b l10n_it_chart_template_generic Iva al 10% (credito) 0.1 False percent 1601 1601 purchase template_impcode_pagata_10 template_ivacode_pagata_10 template_impcode_pagata_10 template_ivacode_pagata_10 -1 -1 False
6 10AO 10AO l10n_it_chart_template_generic Iva al 10% indetraibile 1 0.1 True percent purchase template_impcode_pagata_10ind template_impcode_pagata_10ind -1 False
7 10AOa 10AOa l10n_it_chart_template_generic Iva al 10% indetraibile (1) Iva al 10% indetraibile (D) 2 0 10AO False percent balance 1601 1601 purchase template_impcode_pagata_10ind template_ivacode_pagata_10ind template_impcode_pagata_10ind template_ivacode_pagata_10ind -1 False
8 10AOb 10AOb l10n_it_chart_template_generic Iva al 10% indetraibile (2) Iva al 10% indetraibile (I) 1 0.1 1 10AO False percent purchase False
9 12a 12a l10n_it_chart_template_generic Iva 12% (debito) 0.12 False percent 2601 2601 sale template_impcode_riscossa_12 template_ivacode_riscossa_12 template_impcode_riscossa_12 template_ivacode_riscossa_12 -1 -1 False
10 12b 12b l10n_it_chart_template_generic Iva 12% (credito) 0.12 False percent 1601 1601 purchase template_impcode_pagata_12 template_ivacode_pagata_12 template_impcode_pagata_12 template_ivacode_pagata_12 -1 -1 False
11 2010 2010 l10n_it_chart_template_generic Iva al 20% detraibile 10% 1 0.2 True percent purchase template_impcode_pagata_20det10 template_impcode_pagata_20det10 -1 False
12 2010a 2010a l10n_it_chart_template_generic Iva al 20% detraibile 10% (1) Iva al 20% detraibile 10% (D) 2 0.02 0 2010 False percent balance 1601 1601 purchase template_impcode_pagata_20det10 template_ivacode_pagata_20det10 template_impcode_pagata_20det10 template_ivacode_pagata_20det10 -1 False
13 2010b 2010b l10n_it_chart_template_generic Iva al 20% detraibile 10% (2) Iva al 20% detraibile 10% (I) 1 0.18 0.9 2010 False percent purchase False
14 2015 2015 l10n_it_chart_template_generic Iva al 20% detraibile 15% 1 0.2 True percent purchase template_impcode_pagata_20det15 template_impcode_pagata_20det15 -1 False
15 2015a 2015a l10n_it_chart_template_generic Iva al 20% detraibile 15% (1) Iva al 20% detraibile 15% (D) 2 0.03 0 2015 False percent balance 1601 1601 purchase template_impcode_pagata_20det15 template_ivacode_pagata_20det15 template_impcode_pagata_20det15 template_ivacode_pagata_20det15 -1 False
16 2015b 2015b l10n_it_chart_template_generic Iva al 20% detraibile 15% (2) Iva al 20% detraibile 15% (I) 1 0.17 0.85 2015 False percent purchase False
17 2040 2040 l10n_it_chart_template_generic Iva al 20% detraibile 40% 1 0.2 True percent purchase template_impcode_pagata_20det40 template_impcode_pagata_20det40 -1 False
18 2040a 2040a l10n_it_chart_template_generic Iva al 20% detraibile 40% (1) Iva al 20% detraibile 40% (D) 2 0.08 0 2040 False percent balance 1601 1601 purchase template_impcode_pagata_20det40 template_ivacode_pagata_20det40 template_impcode_pagata_20det40 template_ivacode_pagata_20det40 -1 False
19 2040b 2040b l10n_it_chart_template_generic Iva al 20% detraibile 40% (2) Iva al 20% detraibile 40% (I) 1 0.12 0.6 2040 False percent purchase False
20 20AO 20AO l10n_it_chart_template_generic Iva al 20% indetraibile 1 0.2 True percent purchase template_impcode_pagata_20ind template_impcode_pagata_20ind -1 False
21 20AOa 20AOa l10n_it_chart_template_generic Iva al 20% indetraibile (1) Iva al 20% indetraibile (D) 2 0 20AO False percent balance 1601 1601 purchase template_impcode_pagata_20ind template_ivacode_pagata_20ind template_impcode_pagata_20ind template_ivacode_pagata_20ind -1 False
22 20AOb 20AOb l10n_it_chart_template_generic Iva al 20% indetraibile (2) Iva al 20% indetraibile (I) 1 0.2 1 20AO False percent purchase False
23 20I5 20I5 l10n_it_chart_template_generic IVA al 20% detraibile al 50% 1 0.2 True percent purchase template_impcode_pagata_20det50 template_impcode_pagata_20det50 -1 False
24 20I5a 20I5b 20I5a 20I5b l10n_it_chart_template_generic IVA al 20% detraibile al 50% (1) IVA al 20% detraibile al 50% (I) 1 0.1 0.5 20I5 False percent 1601 1601 purchase template_impcode_pagata_20det50 template_ivacode_pagata_20det50 template_impcode_pagata_20det50 template_ivacode_pagata_20det50 False
25 20I5b 20I5a 20I5b 20I5a l10n_it_chart_template_generic IVA al 20% detraibile al 50% (2) IVA al 20% detraibile al 50% (D) 2 0.1 0 20I5 False percent balance 1601 1601 purchase template_ivacode_pagata_20det50 template_ivacode_pagata_20det50 -1 False
26 22a 22a l10n_it_chart_template_generic Iva 2% (debito) 0.02 False percent 2601 2601 sale template_impcode_riscossa_2 template_ivacode_riscossa_2 template_impcode_riscossa_2 template_ivacode_riscossa_2 -1 -1 False
27 22b 22b l10n_it_chart_template_generic Iva 2% (credito) 0.02 False percent 1601 1601 purchase template_impcode_pagata_2 template_ivacode_pagata_2 template_impcode_pagata_2 template_ivacode_pagata_2 -1 -1 False
28 4a 4a l10n_it_chart_template_generic Iva 4% (debito) 0.04 False percent 2601 2601 sale template_impcode_riscossa_4 template_ivacode_riscossa_4 template_impcode_riscossa_4 template_ivacode_riscossa_4 -1 -1 False
29 4b 4b l10n_it_chart_template_generic Iva 4% (credito) 0.04 False percent 1601 1601 purchase template_impcode_pagata_4 template_ivacode_pagata_4 template_impcode_pagata_4 template_ivacode_pagata_4 -1 -1 False
30 4AO 4AO l10n_it_chart_template_generic Iva al 4% indetraibile 1 0.04 True percent purchase template_impcode_pagata_4ind template_impcode_pagata_4ind -1 False
31 4AOa 4AOa l10n_it_chart_template_generic Iva al 4% indetraibile (1) Iva al 4% indetraibile (D) 2 0 4AO False percent balance 1601 1601 purchase template_impcode_pagata_4ind template_ivacode_pagata_4ind template_impcode_pagata_4ind template_ivacode_pagata_4ind -1 False
32 4AOb 4AOb l10n_it_chart_template_generic Iva al 4% indetraibile (2) Iva al 4% indetraibile (I) 1 0.04 1 4AO False percent purchase False
33 10I5 10I5 l10n_it_chart_template_generic IVA al 10% detraibile al 50% 1 0.1 True percent purchase template_impcode_pagata_10det50 template_impcode_pagata_10det50 -1 False
34 10I5a 10I5a l10n_it_chart_template_generic IVA al 10% detraibile al 50% (1) IVA al 10% detraibile al 50% (D) 2 0.05 0 10I5 False percent balance 1601 1601 purchase template_impcode_pagata_10det50 template_ivacode_pagata_10det50 template_impcode_pagata_10det50 template_ivacode_pagata_10det50 -1 False
35 10I5b 10I5b l10n_it_chart_template_generic IVA al 10% detraibile al 50% (2) IVA al 10% detraibile al 50% (I) 1 0.05 0.5 10I5 False percent purchase False
36 4I5 4I5 l10n_it_chart_template_generic IVA al 4% detraibile al 50% 1 0.04 True percent purchase template_impcode_pagata_4det50 template_impcode_pagata_4det50 -1 False
37 4I5a 4I5a l10n_it_chart_template_generic IVA al 4% detraibile al 50% (1) IVA al 4% detraibile al 50% (D) 2 0.02 0 4I5 False percent balance 1601 1601 purchase template_impcode_pagata_4det50 template_ivacode_pagata_4det50 template_impcode_pagata_4det50 template_ivacode_pagata_4det50 -1 False
38 4I5b 4I5b l10n_it_chart_template_generic IVA al 4% detraibile al 50% (2) IVA al 4% detraibile al 50% (I) 1 0.02 0.5 4I5 False percent purchase False
39 00a 00a l10n_it_chart_template_generic Esente IVA (debito) 0 False percent 2601 2601 sale template_impcode_riscossa_0 template_ivacode_riscossa_0 template_impcode_riscossa_0 template_ivacode_riscossa_0 -1 -1 False
40 00b 00b l10n_it_chart_template_generic Esente IVA (credito) 0 False percent 1601 1601 purchase template_impcode_pagata_0 template_ivacode_pagata_0 template_impcode_pagata_0 template_ivacode_pagata_0 -1 -1 False
41 20a INC 20a INC l10n_it_chart_template_generic Iva al 20% (debito) INC 0.2 False percent l10n_it.2601 l10n_it.2601 sale l10n_it.template_impcode_riscossa_20 l10n_it.template_ivacode_riscossa_20 l10n_it.template_impcode_riscossa_20 l10n_it.template_ivacode_riscossa_20 -1 -1 True
42 10a INC 10a INC l10n_it_chart_template_generic Iva al 10% (debito) INC 0.1 False percent l10n_it.2601 l10n_it.2601 sale l10n_it.template_impcode_riscossa_10 l10n_it.template_ivacode_riscossa_10 l10n_it.template_impcode_riscossa_10 l10n_it.template_ivacode_riscossa_10 -1 -1 True
43 12a INC 12a INC l10n_it_chart_template_generic Iva 12% (debito) INC 0.12 False percent l10n_it.2601 l10n_it.2601 sale l10n_it.template_impcode_riscossa_12 l10n_it.template_ivacode_riscossa_12 l10n_it.template_impcode_riscossa_12 l10n_it.template_ivacode_riscossa_12 -1 -1 True
44 22a INC 22a INC l10n_it_chart_template_generic Iva 2% (debito) INC 0.02 False percent l10n_it.2601 l10n_it.2601 sale l10n_it.template_impcode_riscossa_2 l10n_it.template_ivacode_riscossa_2 l10n_it.template_impcode_riscossa_2 l10n_it.template_ivacode_riscossa_2 -1 -1 True
45 4a INC 4a INC l10n_it_chart_template_generic Iva 4% (debito) INC 0.04 False percent l10n_it.2601 l10n_it.2601 sale l10n_it.template_impcode_riscossa_4 l10n_it.template_ivacode_riscossa_4 l10n_it.template_impcode_riscossa_4 l10n_it.template_ivacode_riscossa_4 -1 -1 True
46 00a INC 00a INC l10n_it_chart_template_generic Esente IVA (debito) INC 0 False percent l10n_it.2601 l10n_it.2601 sale l10n_it.template_impcode_riscossa_0 l10n_it.template_ivacode_riscossa_0 l10n_it.template_impcode_riscossa_0 l10n_it.template_ivacode_riscossa_0 -1 -1 True
+24 -155
View File
@@ -1,174 +1,43 @@
# Italian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * l10n_it
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-07 06:04+0000\n"
"PO-Revision-Date: 2011-02-15 15:37+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Italian <it@li.org>\n"
"Project-Id-Version: OpenERP Server 6.0.2\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-08-11 20:06+0000\n"
"PO-Revision-Date: 2011-08-11 20:06+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:56+0000\n"
"X-Generator: Launchpad (build 12758)\n"
#. module: l10n_it
#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_debit
msgid "Registro acquisti"
msgstr "Registro acquisti"
#. module: l10n_it
#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic
msgid ""
"Generate Chart of Accounts from a Chart Template. You will be asked to pass "
"the name of the company, the chart template to follow, the no. of digits to "
"generate the code for your accounts and Bank account, currency to create "
"Journals. Thus,the pure copy of chart Template is generated.\n"
"\tThis is the same wizard that runs from Financial "
"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
"Chart of Accounts from a Chart Template."
msgstr ""
"Genera il Piano dei Conti da un Modello. Vi verrà richiesto di passare il "
"nome dell'azienda, il modello da seguire, il numero di decimali per generare "
"il codice dei tuoi conti e, per il conto della Banca, la valuta per creare "
"il Libro Giornale. Così una copia vergine del Piano dei Conti, derivatante "
"dal modello, viene generata.\n"
"\tQuesto è la stessa procedura automatica che viene lanciata da: Gestione "
"Finanziaria / Configurazione / Contabilità / Conti finanziari / Genera il "
"Piano dei conti da un modello."
#. module: l10n_it
#: view:account.report_libroiva:0
msgid "Anno Fiscale"
msgstr "Anno Fiscale"
#. module: l10n_it
#: model:account.fiscal.position.template,name:l10n_it.it
msgid "Italia"
msgstr "Italia"
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "REGISTRO IVA"
msgstr "REGISTRO IVA"
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "Protocollo"
msgstr "Protocollo"
#. module: l10n_it
#: model:account.fiscal.position.template,name:l10n_it.extra
msgid "Regime Extra comunitario"
msgstr "Regime Extra comunitario"
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
msgid "VENDITE"
msgstr "VENDITE"
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "Aliquota"
msgstr "Aliquota"
#. module: l10n_it
#: field:account.report_libroiva,company_id:0
msgid "Company"
msgstr "Azienda"
#. module: l10n_it
#: field:account.report_libroiva,name:0
msgid "Fiscal year"
msgstr "Anno fiscale"
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "Numero"
msgstr "Numero"
#. module: l10n_it
#: report:l10n_it.report.libroIVA_debito:0
msgid "Fornitore"
msgstr "Fornitore"
#. module: l10n_it
#: report:l10n_it.report.libroIVA_debito:0
msgid "ACQUISTI"
msgstr "ACQUISTI"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_it
#: model:ir.module.module,description:l10n_it.module_meta_information
msgid ""
"\n"
msgid "\n"
" Piano dei conti italiano di un'impresa generica\n"
" "
msgstr ""
"\n"
msgstr "\n"
" Piano dei conti italiano di un'impresa generica\n"
" "
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
msgid "Cliente"
msgstr "Cliente"
#. module: l10n_it
#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_credit
msgid "Registro vendite"
msgstr "Registro vendite"
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "Periodo"
msgstr "Periodo"
#. module: l10n_it
#: view:account.report_libroiva:0
#: model:ir.actions.act_window,name:l10n_it.l10n_chart_it_report_libroIVA_action
#: model:ir.ui.menu,name:l10n_it.menu_report_l10n_chart_it_libroIVA
msgid "Registri IVA"
msgstr "Registri IVA"
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "Imposta"
msgstr "Imposta"
#. module: l10n_it
#: model:account.fiscal.position.template,name:l10n_it.intra
msgid "Regime Intra comunitario"
msgstr "Regime Intra comunitario"
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "Data fattura"
msgstr "Data fattura"
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "Imponibile"
msgstr "Imponibile"
#. module: l10n_it
#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
msgid "Italy - Generic Chart of Accounts"
msgstr "Italia - Piano dei conti generico"
#. module: l10n_it
#: model:ir.model,name:l10n_it.model_account_report_libroiva
msgid "SQL view for libro IVA"
msgstr "Vista SQL per registro IVA"
#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic
msgid "Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.\n"
" This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template."
msgstr "Genera il piano dei conti da un template. Verrà chiesto di indicare il nome dell'azienda, il piano dei conti da seguire, il numero di cifre per generare il codice dei conti, la valuta per creare i sezionali. Quindi, una semplice copia del template verrà generata.\n"
" Questo è lo stesso wizard che viene eseguito da Contabilità/Configurazione/Contabilità Generale/Assetto finanziario della nuova azienda"
#. module: l10n_it
#: model:ir.model,name:l10n_it.model_account_tax
msgid "account.tax"
msgstr "account.tax"
+11 -126
View File
@@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0.0-rc2\n"
"Project-Id-Version: OpenERP Server 6.0.2\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-07 06:04:30+0000\n"
"PO-Revision-Date: 2011-01-07 06:04:30+0000\n"
"POT-Creation-Date: 2011-08-11 20:06+0000\n"
"PO-Revision-Date: 2011-08-11 20:06+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -15,81 +15,6 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_it
#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_debit
msgid "Registro acquisti"
msgstr ""
#. module: l10n_it
#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic
msgid "Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.\n"
" This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template."
msgstr ""
#. module: l10n_it
#: view:account.report_libroiva:0
msgid "Anno Fiscale"
msgstr ""
#. module: l10n_it
#: model:account.fiscal.position.template,name:l10n_it.it
msgid "Italia"
msgstr ""
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "REGISTRO IVA"
msgstr ""
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "Protocollo"
msgstr ""
#. module: l10n_it
#: model:account.fiscal.position.template,name:l10n_it.extra
msgid "Regime Extra comunitario"
msgstr ""
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
msgid "VENDITE"
msgstr ""
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "Aliquota"
msgstr ""
#. module: l10n_it
#: field:account.report_libroiva,company_id:0
msgid "Company"
msgstr ""
#. module: l10n_it
#: field:account.report_libroiva,name:0
msgid "Fiscal year"
msgstr ""
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "Numero"
msgstr ""
#. module: l10n_it
#: report:l10n_it.report.libroIVA_debito:0
msgid "Fornitore"
msgstr ""
#. module: l10n_it
#: report:l10n_it.report.libroIVA_debito:0
msgid "ACQUISTI"
msgstr ""
#. module: l10n_it
#: model:ir.module.module,description:l10n_it.module_meta_information
msgid "\n"
@@ -97,59 +22,19 @@ msgid "\n"
" "
msgstr ""
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
msgid "Cliente"
msgstr ""
#. module: l10n_it
#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_credit
msgid "Registro vendite"
msgstr ""
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "Periodo"
msgstr ""
#. module: l10n_it
#: view:account.report_libroiva:0
#: model:ir.actions.act_window,name:l10n_it.l10n_chart_it_report_libroIVA_action
#: model:ir.ui.menu,name:l10n_it.menu_report_l10n_chart_it_libroIVA
msgid "Registri IVA"
msgstr ""
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "Imposta"
msgstr ""
#. module: l10n_it
#: model:account.fiscal.position.template,name:l10n_it.intra
msgid "Regime Intra comunitario"
msgstr ""
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "Data fattura"
msgstr ""
#. module: l10n_it
#: report:l10n_it.report.libroIVA_credito:0
#: report:l10n_it.report.libroIVA_debito:0
msgid "Imponibile"
msgstr ""
#. module: l10n_it
#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
msgid "Italy - Generic Chart of Accounts"
msgstr ""
#. module: l10n_it
#: model:ir.model,name:l10n_it.model_account_report_libroiva
msgid "SQL view for libro IVA"
#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic
msgid "Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.\n"
" This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template."
msgstr ""
#. module: l10n_it
#: model:ir.model,name:l10n_it.model_account_tax
msgid "account.tax"
msgstr ""
-54
View File
@@ -1,54 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010
# Italian OpenERP Community (<http://www.openerp-italia.com>)
# Servabit srl
# Agile Business Group sagl
# Domsense srl
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# ##################################################################################
# Questa vista SQL viene usata solo per far scegliere l'anno di pianificazione all'utente
# Viene infatti costruita una vista XML di tipo tree che contiene solo i diversi anni per i quali stata fatta almeno una pianificazione
# ##################################################################################
from osv import fields, osv
class l10n_chart_it_report_libroIVA (osv.osv):
_name = "account.report_libroiva"
_description = "SQL view for libro IVA"
_auto = False
_rec_name = "name"
#_order = "fiscal_year";
_columns = {
'name': fields.char('Fiscal year',size=64),
'company_id': fields.many2one('res.company', 'Company'),
}
def init (self, cr) :
cr.execute("""DROP VIEW IF EXISTS account_report_libroiva""")
cr.execute("""
CREATE VIEW account_report_libroiva AS (
SELECT id, name, company_id FROM account_fiscalyear
)""")
l10n_chart_it_report_libroIVA()
-16
View File
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE terp SYSTEM "openerp-view.dtd">
<openerp>
<data>
<!-- ****************************
MENU REPORT LIBRI IVA
**************************** -->
<menuitem name="Registri IVA"
id="menu_report_l10n_chart_it_libroIVA"
sequence="20"
parent="account.menu_finance_reporting"
action="l10n_chart_it_report_libroIVA_action"
/>
</data>
</openerp>
-47
View File
@@ -1,47 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- ****************************
REGISTRI IVA TREE VIEW
****************************-->
<record model="ir.ui.view" id="l10n_chart_it_report_libroIVA_tree">
<field name="name">l10n_chart_it_report_libroIVA_tree</field>
<field name="model">account.report_libroiva</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Registri IVA" limit="80">
<field name="name" string="Anno Fiscale" readonly="True" select="1" />
</tree>
</field>
</record>
<!-- ****************************
REGISTRI IVA FORM VIEW
****************************-->
<record model="ir.ui.view" id="l10n_chart_it_report_libroIVA_form">
<field name="name">l10n_chart_it_report_libroIVA_form</field>
<field name="model">account.report_libroiva</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Registri IVA" >
<field name="name" string="Anno Fiscale" readonly="True" />
</form>
</field>
</record>
<!-- ****************************
REGISTRI IVA ACTION
****************************-->
<record model="ir.actions.act_window" id="l10n_chart_it_report_libroIVA_action">
<field name="name">Registri IVA</field>
<field name="res_model">account.report_libroiva</field>
<field name="view_id" ref="l10n_chart_it_report_libroIVA_tree"/>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
</data>
</openerp>
-24
View File
@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<report name="l10n_it.report.libroIVA_credito"
id="account_ita_libroIVA_credit"
string="Registro vendite"
model="account.report_libroiva"
rml="addons/l10n_it/report/libroIVA_credito.rml"
auto="False"
header="False"
/>
<report name="l10n_it.report.libroIVA_debito"
id="account_ita_libroIVA_debit"
string="Registro acquisti"
model="account.report_libroiva"
rml="addons/l10n_it/report/libroIVA_debito.rml"
auto="False"
header="False"
/>
</data>
</openerp>
-2
View File
@@ -1,2 +0,0 @@
import libroIVA_credito
import libroIVA_debito
-79
View File
@@ -1,79 +0,0 @@
import datetime
import time
from report import report_sxw
from osv import osv
import pooler
class l10n_chart_it_report_libroIVA_credito(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(l10n_chart_it_report_libroIVA_credito,self).__init__(cr,uid,name,context)
self.localcontext.update({
'time' : time,
'get_company' : self.get_company,
'get_periods' : self.get_periods,
'get_lines' : self.get_lines,
})
def get_company(self,fiscal_year):
#print 'COMP = ',fiscal_year
return ""
def get_periods(self,fiscal_year):
#print 'Fiscal year id:',fiscal_year.id
obj=pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
fy=obj.browse(self.cr,self.uid,fiscal_year.id)
#print 'Periods = ',fy.period_ids
res=[rec for rec in fy.period_ids]
#return fy.periods => non funziona?!? bool object !?!?
return res
def get_invoices(self,period):
#print 'PERIOD = ',period.name
obj=pooler.get_pool(self.cr.dbname).get('account.invoice')
# Selezione tutte le fatture emesse nel periodo
self.cr.execute( """
SELECT id FROM account_invoice
WHERE (state='open' OR state='paid') AND
period_id="""+str(period.id)+"""
AND (type='out_invoice' OR type='out_refund')
""")
ids=self.cr.fetchall()
#print 'IDS = ',
if ids:
ids=[id[0] for id in ids ]
invoices=obj.browse(self.cr,self.uid,ids)
#print 'INVOICES = ',invoices
return invoices
def get_lines(self,fiscal_year):
res=[]
obj_fy=pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
fy=obj_fy.browse(self.cr,self.uid,fiscal_year.id)
for period in fy.period_ids:
invoices=self.get_invoices(period)
for invoice in invoices:
d={'periodo': period.name}
d['protocollo']=invoice.number
#print 'PARTNER ',invoice.partner_id.name
causale=invoice.partner_id.name
#print 'CAUSALE = ',causale
d['causale']=causale
d['numero']=invoice.reference
d['data_doc']=invoice.date_invoice
for tax in invoice.tax_line:
#print '\tTAX: ',tax
d['aliquota']=tax.tax_code_id.name
d['imponibile']=tax.base
d['imposta']=tax.amount
res.append(d)
d={'periodo':'', 'protocollo':'', 'causale':'', 'numero':'', 'data_doc':'', }
return res
report_sxw.report_sxw('report.l10n_it.report.libroIVA_credito','account.report_libroiva',
'l10n_it/report/libroIVA_credito.rml',
parser=l10n_chart_it_report_libroIVA_credito,header=False)
-203
View File
@@ -1,203 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(612.0,792.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="498" height="678"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="5,0" stop="5,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="6,0" stop="6,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="7,0" stop="7,-1"/>
<lineStyle kind="LINEAFTER" colorName="#000000" start="7,0" stop="7,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="0,1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="1,1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="2,1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="3,1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="4,1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="5,1" stop="5,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="6,1" stop="6,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="7,1" stop="7,-1"/>
<lineStyle kind="LINEAFTER" colorName="#000000" start="7,1" stop="7,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
<blockBackground colorName="#ffcc99" start="0,0" stop="0,-1"/>
<blockBackground colorName="#ffcc99" start="1,0" stop="1,-1"/>
<blockBackground colorName="#ffcc99" start="2,0" stop="2,-1"/>
<blockBackground colorName="#ffcc99" start="3,0" stop="3,-1"/>
<blockBackground colorName="#ffcc99" start="4,0" stop="4,-1"/>
<blockBackground colorName="#ffcc99" start="5,0" stop="5,-1"/>
<blockBackground colorName="#ffcc99" start="6,0" stop="6,-1"/>
<blockBackground colorName="#ffcc99" start="7,0" stop="7,-1"/>
<blockBackground colorName="#ffffff" start="0,1" stop="0,-1"/>
<blockBackground colorName="#ffffff" start="1,1" stop="1,-1"/>
<blockBackground colorName="#ffffff" start="2,1" stop="2,-1"/>
<blockBackground colorName="#ffffff" start="3,1" stop="3,-1"/>
<blockBackground colorName="#ffffff" start="4,1" stop="4,-1"/>
<blockBackground colorName="#ffffff" start="5,1" stop="5,-1"/>
<blockBackground colorName="#ffffff" start="6,1" stop="6,-1"/>
<blockBackground colorName="#ffffff" start="7,1" stop="7,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" alignment="RIGHT"/>
<paraStyle name="P2" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="P4" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER"/>
<paraStyle name="P5" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="P6" rightIndent="0.0" leftIndent="71.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="RIGHT"/>
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="P8" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER"/>
<paraStyle name="P9" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="P10" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="P11" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER"/>
<paraStyle name="P12" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="P13" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="P14" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/>
<paraStyle name="P15" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/>
<paraStyle name="P16" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="RIGHT"/>
<paraStyle name="P17" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Table Contents" fontName="Times-Roman"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="MP1" fontName="Times-Roman" alignment="RIGHT"/>
</stylesheet>
<images/>
<story>
<para style="P2">[[ repeatIn(objects, 'o') ]]</para>
<blockTable colWidths="249.0,249.0" style="Table1">
<tr>
<td>
<para style="P10">
<font face="Times-Roman" size="10.0">[[ get_company(o) ]]</font>
</para>
</td>
<td>
<para style="P16">
<font face="Times-Roman">REGISTRO IVA </font>
</para>
<para style="P16">
<font face="Times-Roman">VENDITE </font>
</para>
</td>
</tr>
</blockTable>
<para style="P2">
<font color="white"> </font>
</para>
<para style="P11">[[ o.name ]] </para>
<para style="P2">
<font color="white"> </font>
</para>
<blockTable colWidths="39.0,50.0,92.0,45.0,54.0,76.0,69.0,74.0" repeatRows="1" style="Table2">
<tr>
<td>
<para style="P7">Periodo</para>
</td>
<td>
<para style="P7">Protocollo</para>
</td>
<td>
<para style="P7">Cliente</para>
</td>
<td>
<para style="P7">Numero</para>
</td>
<td>
<para style="P7">Data fattura</para>
</td>
<td>
<para style="P7">Aliquota</para>
</td>
<td>
<para style="P7">Imponibile</para>
</td>
<td>
<para style="P7">Imposta</para>
</td>
</tr>
<tr>
<td>
<para style="P3">[[ repeatIn(get_lines(o), 'line') ]]</para>
<para style="P3">[[ line['periodo'] ]]</para>
</td>
<td>
<para style="P3">[[ line['protocollo'] ]]</para>
</td>
<td>
<para style="P3">[[ line['causale'] ]]</para>
</td>
<td>
<para style="P3">[[ line['numero'] ]]</para>
</td>
<td>
<para style="P3">[[ line['data_doc'] ]]</para>
</td>
<td>
<para style="P14">[[ line['aliquota'] ]]</para>
</td>
<td>
<para style="P15">[[ line['imponibile'] ]]</para>
</td>
<td>
<para style="P15">[[ line['imposta'] ]]</para>
</td>
</tr>
</blockTable>
<para style="P9">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
</story>
</document>
-80
View File
@@ -1,80 +0,0 @@
import datetime
import time
from report import report_sxw
from osv import osv
import pooler
class l10n_chart_it_report_libroIVA_debito(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(l10n_chart_it_report_libroIVA_debito,self).__init__(cr,uid,name,context)
self.localcontext.update({
'time' : time,
'get_company' : self.get_company,
'get_periods' : self.get_periods,
'get_lines' : self.get_lines,
})
def get_company(self,fiscal_year):
#print 'COMP = ',fiscal_year
return ""
def get_periods(self,fiscal_year):
#print 'Fiscal year id:',fiscal_year.id
obj=pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
fy=obj.browse(self.cr,self.uid,fiscal_year.id)
#print 'Periods = ',fy.period_ids
res=[rec for rec in fy.period_ids]
#return fy.periods => non funziona?!? bool object !?!?
return res
def get_invoices(self,period):
#print 'PERIOD = ',period.name
obj=pooler.get_pool(self.cr.dbname).get('account.invoice')
# Selezione tutte le fatture emesse nel periodo
self.cr.execute( """
SELECT id FROM account_invoice
WHERE (state='open' OR state='paid') AND
period_id="""+str(period.id)+"""
AND (type='in_invoice' OR type='in_refund')
""")
ids=self.cr.fetchall()
#print 'IDS = ',
if ids:
ids=[id[0] for id in ids ]
invoices=obj.browse(self.cr,self.uid,ids)
#print 'INVOICES = ',invoices
return invoices
def get_lines(self,fiscal_year):
res=[]
obj_fy=pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
fy=obj_fy.browse(self.cr,self.uid,fiscal_year.id)
for period in fy.period_ids:
invoices=self.get_invoices(period)
for invoice in invoices:
d={'periodo': period.name}
d['protocollo']=invoice.number
#print 'PARTNER ',invoice.partner_id.name
causale=invoice.partner_id.name
#print 'CAUSALE = ',causale
d['causale']=causale
d['numero']=invoice.reference
d['data_doc']=invoice.date_invoice
for tax in invoice.tax_line:
#print '\tTAX: ',tax
d['aliquota']=tax.tax_code_id.name
d['imponibile']=tax.base
d['imposta']=tax.amount
res.append(d)
d={'periodo':'', 'protocollo':'', 'causale':'', 'numero':'', 'data_doc':'', }
return res
report_sxw.report_sxw('report.l10n_it.report.libroIVA_debito','account.report_libroiva',
'l10n_it/report/libroIVA_debito.rml',
parser=l10n_chart_it_report_libroIVA_debito,header=False)
-195
View File
@@ -1,195 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(612.0,792.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="498" height="678"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="5,0" stop="5,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="6,0" stop="6,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="7,0" stop="7,-1"/>
<lineStyle kind="LINEAFTER" colorName="#000000" start="7,0" stop="7,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="0,1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="1,1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="2,1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="3,1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="4,1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="5,1" stop="5,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="6,1" stop="6,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#000000" start="7,1" stop="7,-1"/>
<lineStyle kind="LINEAFTER" colorName="#000000" start="7,1" stop="7,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
<blockBackground colorName="#ffcc99" start="0,0" stop="0,-1"/>
<blockBackground colorName="#ffcc99" start="1,0" stop="1,-1"/>
<blockBackground colorName="#ffcc99" start="2,0" stop="2,-1"/>
<blockBackground colorName="#ffcc99" start="3,0" stop="3,-1"/>
<blockBackground colorName="#ffcc99" start="4,0" stop="4,-1"/>
<blockBackground colorName="#ffcc99" start="5,0" stop="5,-1"/>
<blockBackground colorName="#ffcc99" start="6,0" stop="6,-1"/>
<blockBackground colorName="#ffcc99" start="7,0" stop="7,-1"/>
<blockBackground colorName="#ffffff" start="0,1" stop="0,-1"/>
<blockBackground colorName="#ffffff" start="1,1" stop="1,-1"/>
<blockBackground colorName="#ffffff" start="2,1" stop="2,-1"/>
<blockBackground colorName="#ffffff" start="3,1" stop="3,-1"/>
<blockBackground colorName="#ffffff" start="4,1" stop="4,-1"/>
<blockBackground colorName="#ffffff" start="5,1" stop="5,-1"/>
<blockBackground colorName="#ffffff" start="6,1" stop="6,-1"/>
<blockBackground colorName="#ffffff" start="7,1" stop="7,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" alignment="RIGHT"/>
<paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/>
<paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/>
<paraStyle name="P5" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="P6" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER"/>
<paraStyle name="P7" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="P9" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="P10" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="P11" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER"/>
<paraStyle name="P12" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="RIGHT"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Table Contents" fontName="Times-Roman"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="MP1" fontName="Times-Roman" alignment="RIGHT"/>
</stylesheet>
<images/>
<story>
<para style="P7">[[ repeatIn(objects, 'o') ]]</para>
<blockTable colWidths="249.0,249.0" style="Table2">
<tr>
<td>
<para style="P10">
<font face="Times-Roman" size="10.0">[[ get_company(o) ]]</font>
</para>
</td>
<td>
<para style="P12">
<font face="Times-Roman">REGISTRO IVA</font>
</para>
<para style="P12">
<font face="Times-Roman">ACQUISTI</font>
</para>
</td>
</tr>
</blockTable>
<para style="P7">
<font color="white"> </font>
</para>
<para style="P11">[[ o.name ]] </para>
<para style="P7">
<font color="white"> </font>
</para>
<blockTable colWidths="39.0,50.0,92.0,45.0,54.0,76.0,69.0,74.0" repeatRows="1" style="Table1">
<tr>
<td>
<para style="P8">Periodo</para>
</td>
<td>
<para style="P8">Protocollo</para>
</td>
<td>
<para style="P8">Fornitore</para>
</td>
<td>
<para style="P8">Numero</para>
</td>
<td>
<para style="P8">Data fattura</para>
</td>
<td>
<para style="P8">Aliquota</para>
</td>
<td>
<para style="P8">Imponibile</para>
</td>
<td>
<para style="P8">Imposta</para>
</td>
</tr>
<tr>
<td>
<para style="P2">[[ repeatIn(get_lines(o), 'line') ]]</para>
<para style="P2">[[ line['periodo'] ]]</para>
</td>
<td>
<para style="P2">[[ line['protocollo'] ]]</para>
</td>
<td>
<para style="P2">[[ line['causale'] ]]</para>
</td>
<td>
<para style="P2">[[ line['numero'] ]]</para>
</td>
<td>
<para style="P2">[[ line['data_doc'] ]]</para>
</td>
<td>
<para style="P3">[[ line['aliquota'] ]]</para>
</td>
<td>
<para style="P4">[[ line['imponibile'] ]]</para>
</td>
<td>
<para style="P4">[[ line['imposta'] ]]</para>
</td>
</tr>
</blockTable>
<para style="P5">
<font color="white"> </font>
</para>
<para style="P6">
<font color="white"> </font>
</para>
</story>
</document>
-696
View File
@@ -1,696 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:office="http://openoffice.org/2000/office"
xmlns:style="http://openoffice.org/2000/style"
xmlns:text="http://openoffice.org/2000/text"
xmlns:table="http://openoffice.org/2000/table"
xmlns:draw="http://openoffice.org/2000/drawing"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:number="http://openoffice.org/2000/datastyle"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:chart="http://openoffice.org/2000/chart"
xmlns:dr3d="http://openoffice.org/2000/dr3d"
xmlns:math="http://www.w3.org/1998/Math/MathML"
xmlns:form="http://openoffice.org/2000/form"
xmlns:script="http://openoffice.org/2000/script"
office:class="text" office:version="1.0"
exclude-result-prefixes = "xsl fo office style text table draw xlink number svg chart dr3d math form script">
<!--TODO's: indent, picture cache (trml2pdf) -->
<xsl:output method="xml" indent="yes" />
<xsl:strip-space elements="*"/>
<xsl:key name="text_style" match="style:style[@style:family='text']" use="@style:name" />
<xsl:key name="page_break_before" match="style:style[@style:family='paragraph' and ./style:properties/@fo:break-before='page']" use="@style:name" />
<xsl:key name="page_break_after" match="style:style[@style:family='paragraph' and ./style:properties/@fo:break-after='page']" use="@style:name" />
<xsl:key name="table_column_style" match="style:style[@style:family='table-column']" use="@style:name" />
<xsl:key name="table_cell_style" match="style:style[@style:family='table-cell']" use="@style:name" />
<xsl:key name="paragraph_style" match="style:style[@style:family='paragraph']" use="@style:name" />
<xsl:template match="office:document-content">
<document filename="test.pdf">
<xsl:apply-templates select="office:automatic-styles" />
<xsl:apply-templates select="office:body" />
</document>
</xsl:template>
<xsl:template name="page_size">
<xsl:attribute name="pageSize">
<xsl:text>(</xsl:text>
<xsl:value-of select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-width" />
<xsl:text>,</xsl:text>
<xsl:value-of select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-height" />
<xsl:text>)</xsl:text>
</xsl:attribute>
</xsl:template>
<xsl:template name="fixed_frame">
<xsl:for-each select="//draw:text-box">
<frame>
<xsl:attribute name="id"><xsl:value-of select="./@draw:name" /></xsl:attribute>
<xsl:attribute name="x1"><xsl:value-of select="./@svg:x" /></xsl:attribute>
<xsl:attribute name="y1">
<xsl:value-of
select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-height - ./@svg:y - ./@fo:min-height" />
</xsl:attribute>
<xsl:attribute name="width">
<xsl:value-of select="./@svg:width" />
</xsl:attribute>
<xsl:attribute name="height">
<xsl:value-of select="./@fo:min-height" />
</xsl:attribute>
</frame>
</xsl:for-each>
</xsl:template>
<xsl:template name="margin_sizes">
<xsl:variable name="margin_left" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-left" />
<xsl:variable name="margin_right" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-right" />
<xsl:variable name="margin_top" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-top" />
<xsl:variable name="margin_bottom" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-bottom" />
<xsl:variable name="page_width" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-width" />
<xsl:variable name="page_height" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-height" />
<xsl:attribute name="x1"><xsl:value-of select="$margin_left" /></xsl:attribute>
<xsl:attribute name="y1"><xsl:value-of select="$margin_bottom" /></xsl:attribute>
<xsl:attribute name="width"><xsl:value-of select="$page_width - $margin_left - $margin_right"/></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="$page_height - $margin_bottom - $margin_top"/></xsl:attribute>
</xsl:template>
<xsl:template name="text_width">
<!-- You need this for the workaround to make primitive outlines-->
<xsl:variable name="margin_left" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-left" />
<xsl:variable name="margin_right" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:margin-right" />
<xsl:variable name="page_width" select="//transferredfromstylesxml/style:page-master[1]/style:properties/@fo:page-width" />
<xsl:value-of select="$page_width - $margin_left - $margin_right - 18"/>
</xsl:template>
<xsl:template match="office:automatic-styles">
<!--<template pageSize="(21cm, 29.7cm)" leftMargin="1.0cm" rightMargin="2.0cm" topMargin="1.0cm" bottomMargin="1.0cm" title="Test" author="Martin Simon" allowSplitting="20">-->
<template pageSize="(21cm, 29.7cm)" title="Test" author="Martin Simon" allowSplitting="20">
<xsl:call-template name="page_size" />
<pageTemplate id="first">
<xsl:call-template name="fixed_frame" />
<frame id="first" x1="2cm" y1="2cm" width="17cm" height="26cm">
<xsl:call-template name="margin_sizes" />
</frame>
</pageTemplate>
</template>
<stylesheet>
<!--A table style to simulate primitive outlines -till the <addOutline> tag is implemented in trml2pdf -->
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<!--use two standard table grid styles like PyOpenOffice "Old Way": with and without a grid-->
<!--TODO insert table cell colors here, not within the <td> tag - otherwise
it will not work with flowables as cell content-->
<xsl:call-template name="make_blocktablestyle" />
<initialize>
<paraStyle name="all" alignment="justify" />
</initialize>
<xsl:apply-templates select="style:style" />
</stylesheet>
</xsl:template>
<xsl:template name="make_blocktablestyle">
<xsl:for-each select="//table:table">
<xsl:variable name="test">
<xsl:value-of select="./@table:name" />
</xsl:variable>
<xsl:if test="not(boolean(count(preceding-sibling::table:table[@table:name=$test])))">
<!--Test if this is the first table with this style, nested tables not counted-->
<blockTableStyle id="{@table:name}">
<xsl:if test=".//draw:image">
<blockTopPadding value="0"/>
<blockBottomPadding value="0"/>
</xsl:if>
<blockAlignment value="LEFT" />
<blockValign value="TOP" />
<xsl:call-template name="make_linestyle" />
<xsl:call-template name="make_tablebackground" />
</blockTableStyle>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="make_linestyle">
<xsl:for-each select=".//table:table-row">
<xsl:variable name="row" select="position() - 1"/>
<xsl:for-each select=".//table:table-cell">
<xsl:variable name="col" select="position() - 1"/>
<xsl:variable name="linebefore">
<xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-left"/>
</xsl:variable>
<xsl:if test="not($linebefore='') and not($linebefore='none')">
<xsl:variable name="colorname">
<xsl:value-of select="substring-after($linebefore,'#')"/>
</xsl:variable>
<lineStyle kind="LINEBEFORE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
</xsl:if>
<xsl:variable name="lineafter">
<xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-right"/>
</xsl:variable>
<xsl:if test="not($lineafter='') and not($lineafter='none')">
<xsl:variable name="colorname">
<xsl:value-of select="substring-after($lineafter,'#')"/>
</xsl:variable>
<lineStyle kind="LINEAFTER" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
</xsl:if>
<xsl:variable name="lineabove">
<xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-top"/>
</xsl:variable>
<xsl:if test="not($lineabove='') and not($lineabove='none')">
<xsl:variable name="colorname">
<xsl:value-of select="substring-after($lineabove,'#')"/>
</xsl:variable>
<lineStyle kind="LINEABOVE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},{$row}"/>
</xsl:if>
<xsl:variable name="linebelow">
<xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border-bottom"/>
</xsl:variable>
<xsl:if test="not($linebelow='') and not($linebelow='none')">
<xsl:variable name="colorname">
<xsl:value-of select="substring-after($linebelow,'#')"/>
</xsl:variable>
<lineStyle kind="LINEBELOW" colorName="#{$colorname}" start="{$col},{-1}" stop="{$col},{-1}"/>
</xsl:if>
<xsl:variable name="grid">
<xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:border"/>
</xsl:variable>
<xsl:if test="not($grid='') and not($grid='none')">
<xsl:variable name="colorname">
<xsl:value-of select="substring-after($grid,'#')"/>
</xsl:variable>
<!-- Don't use grid because we don't need a line between each rows -->
<lineStyle kind="LINEBEFORE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
<lineStyle kind="LINEAFTER" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},-1"/>
<lineStyle kind="LINEABOVE" colorName="#{$colorname}" start="{$col},{$row}" stop="{$col},{$row}"/>
<lineStyle kind="LINEBELOW" colorName="#{$colorname}" start="{$col},{-1}" stop="{$col},{-1}"/>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
<!-- Was needed to simulate bulleted lists:
<xsl:template match="text:ordered-list|text:unordered-list">
<xsl:variable name = "text_width">
<xsl:call-template name="text_width" />
</xsl:variable>
<blockTable style="Standard_Outline" colWidths="18,{$text_width}">
<xsl:apply-templates match="text:list-item" />
</blockTable>
</xsl:template>
<xsl:template match="text:list-item">
<tr>
<td><para><font face="Helvetica-Bold" size="10">*</font></para></td>
<td>
<xsl:apply-templates />
</td>
</tr>
</xsl:template>
-->
<xsl:template match="office:body">
<story>
<xsl:apply-templates />
<xsl:for-each select="//draw:text-box">
<currentFrame>
<xsl:attribute name="name">
<xsl:value-of select="./@draw:name" />
</xsl:attribute>
</currentFrame>
<xsl:apply-templates>
<xsl:with-param name="skip_draw" select="0" />
</xsl:apply-templates>
<frameEnd />
</xsl:for-each>
<xsl:for-each select="//text:ordered-list">
<para><seqReset id="{//text:ordered-list/@text:style-name}"/></para>
</xsl:for-each>
</story>
</xsl:template>
<xsl:template match="table:table">
<blockTable>
<xsl:attribute name="colWidths">
<xsl:call-template name="make_columns" />
</xsl:attribute>
<xsl:call-template name="make_tableheaders" />
<xsl:attribute name="style">
<xsl:value-of select="@table:name" />
</xsl:attribute>
<xsl:apply-templates />
</blockTable>
</xsl:template>
<xsl:template name="make_tableheaders">
<xsl:if test="boolean(count(table:table-header-rows))">
<xsl:attribute name="repeatRows">1</xsl:attribute>
</xsl:if>
</xsl:template>
<xsl:template name="make_tablebackground">
<xsl:for-each select=".//table:table-row">
<!--Be careful when there are table:table-header-rows as
parent node of table:table-row -->
<xsl:variable name="row" select="position() - 1" />
<xsl:for-each select="./table:table-cell">
<xsl:variable name="col" select="position() - 1" />
<xsl:variable name="background">
<xsl:value-of select="key('table_cell_style',@table:style-name)/style:properties/@fo:background-color" />
</xsl:variable>
<xsl:if test="not($background='') and boolean(key('table_cell_style',@table:style-name)/style:properties/@fo:background-color) and starts-with($background,'#')">
<!--only RGB hexcolors are accepted -->
<blockBackground colorName="{$background}" start="{$col},{$row}" stop="{$col},-1" />
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
<xsl:template name="make_columns">
<xsl:variable name="columns" >
<xsl:for-each select="table:table-column">
<xsl:value-of select="key('table_column_style',@table:style-name)/style:properties/@style:column-width" />
<xsl:text>,</xsl:text>
</xsl:for-each>
</xsl:variable>
<xsl:value-of select="substring($columns,1,string-length($columns) - 1)" />
<!--strip the last comma-->
</xsl:template>
<xsl:template match="table:table-row">
<tr>
<xsl:apply-templates />
</tr>
</xsl:template>
<xsl:template match="table:table-cell">
<td>
<xsl:apply-templates />
</td>
</xsl:template>
<xsl:template match="text:section">
<section>
<xsl:apply-templates />
</section>
</xsl:template>
<xsl:template match="text:span">
<font>
<xsl:call-template name="make_fontnames_span" />
<xsl:call-template name="make_fontsize_span" />
<xsl:apply-templates />
</font>
</xsl:template>
<xsl:template name="make_fontsize_span">
<xsl:variable name ="fontsize">
<xsl:value-of select="key('text_style',@text:style-name)/style:properties/@fo:font-size" />
</xsl:variable>
<xsl:if test="not($fontsize='') and boolean(key('text_style',@text:style-name)/style:properties/@fo:font-size)" >
<xsl:attribute name="size">
<xsl:value-of select="$fontsize" />
</xsl:attribute>
</xsl:if>
</xsl:template>
<xsl:template name="make_fontnames_span">
<xsl:attribute name="face">
<xsl:call-template name="make_fontnames">
<xsl:with-param name="fontName" select="key('text_style',@text:style-name)/style:properties/@style:font-name" />
<xsl:with-param name="fontWeight" select="key('text_style',@text:style-name)/style:properties/@fo:font-weight" />
<xsl:with-param name="fontStyle" select="key('text_style',@text:style-name)/style:properties/@fo:font-style" />
</xsl:call-template>
</xsl:attribute>
</xsl:template>
<xsl:template name="make_image">
<illustration height="{.//draw:image/@svg:height}" width="{.//draw:image/@svg:width}">
<image x="0" y="0" file="{substring-after(.//draw:image/@xlink:href,'#Pictures/')}" height="{.//draw:image/@svg:height}" width="{.//draw:image/@svg:width}" />
</illustration>
</xsl:template>
<xsl:template name="empty_paragraph">
<xsl:if test="not(boolean(count(descendant::node())))">
<xsl:call-template name="distance_point">
<xsl:with-param name="background" select="key('paragraph_style',@text:style-name)/style:properties/@fo:background-color" />
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="distance_point">
<xsl:param name="background" />
<xsl:param name="tab_stop"></xsl:param>
<xsl:variable name="local_back">
<xsl:choose>
<xsl:when test="not(boolean($background)) or not(contains($background,'#'))">
<!-- Do not accept OO colors like "transparent", only hex-colors -->
<xsl:text>white</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$background" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<font color="{$local_back}">
<xsl:text> </xsl:text>
<xsl:if test="boolean($tab_stop)">
<!-- simulate a tabstop with white/background-color points -->
<xsl:text>.........</xsl:text>
</xsl:if>
</font>
</xsl:template>
<xsl:template match="text:ordered-list">
<xsl:apply-templates />
<!-- Reset the counter. seqreset is not a trml2pdf tag, but a Platypus Intra Paragraph Markup,
so it needs a dummy paragraph to enclose it -->
</xsl:template>
<xsl:template name="make_listitem">
<xsl:if test="(name(..)='text:list-item')">
<xsl:attribute name="leftIndent">15</xsl:attribute>
<xsl:attribute name="bulletIndent">0</xsl:attribute>
<xsl:choose>
<xsl:when test="(name(../..)='text:unordered-list')">
<xsl:variable name="fontsize">
<xsl:value-of select="number(key('paragraph_style',@text:style-name)/style:properties/@fo:font-size)" />
</xsl:variable>
<xsl:choose>
<xsl:when test="$fontsize='NaN'">
<!-- you should exclude non-numerical values for bulletFontSize. <== Sometimes the preprocessing went wrong.-->
<!--use a default bullet font size-->
<xsl:attribute name="bulletFontSize">6</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="bulletFontSize"><xsl:value-of select="floor(($fontsize div 2) + 1)" /></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:attribute name="bulletFontName">ZapfDingbats</xsl:attribute>
<xsl:attribute name="bulletText">l</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<!-- Generate the numbers for an ordered list -->
<xsl:variable name="size">
<xsl:value-of select="key('paragraph_style',@text:style-name)/style:properties/@fo:font-size" />
</xsl:variable>
<!-- For ordered lists we use the bullet tag from Platypus Intra Paragraph Markup -->
<bullet>
<xsl:if test="not($size='') and boolean(key('paragraph_style',@text:style-name)/style:properties/@fo:font-size)">
<xsl:attribute name="size">
<!-- adapt the fontsize to the fontsize of the current paragraph -->
<xsl:value-of select="$size" />
</xsl:attribute>
</xsl:if>
<seq id="{../../@text:style-name}"/>.</bullet>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template match="text:drop-down">
<xsl:value-of select="text:label[2]/@text:value" />
</xsl:template>
<xsl:template match="text:p|text:h">
<xsl:param name="skip_draw" select="1" />
<xsl:if test="boolean(key('page_break_before',@text:style-name))" >
<pageBreak />
</xsl:if>
<xsl:choose>
<xsl:when test="boolean(.//draw:image)">
<xsl:call-template name="make_image" />
</xsl:when>
<xsl:when test="boolean(name(..) = 'draw:text-box') and boolean($skip_draw)">
</xsl:when>
<xsl:otherwise>
<para>
<xsl:attribute name="style">
<xsl:value-of select="@text:style-name" />
</xsl:attribute>
<xsl:call-template name="make_listitem" />
<xsl:apply-templates />
<xsl:call-template name="empty_paragraph" />
</para>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="boolean(key('page_break_after',@text:style-name))" >
<pageBreak />
</xsl:if>
</xsl:template>
<xsl:template match="text:p/text:tab-stop">
<!-- simulate a tabstop -->
<xsl:call-template name="distance_point">
<xsl:with-param name="background" select="key('paragraph_style',@text:style-name)/style:properties/@fo:background-color" />
<xsl:with-param name="tab_stop">yes</xsl:with-param>
</xsl:call-template>
</xsl:template>
<!-- experimental - switched off
<xsl:template match="text:h">
<para>
<xsl:attribute name="style">
<xsl:value-of select="@text:style-name" />
</xsl:attribute>
<xsl:call-template name="make_number" />
<xsl:apply-templates />
<xsl:call-template name="empty_paragraph" />
</para>
</xsl:template>
<xsl:template name="make_number">
<xsl:choose>
<xsl:when test="@text:level='1'">
<xsl:number format="1. " />
</xsl:when>
<xsl:when test="@text:level='2'">
<xsl:number count="text:h[@text:level='1']|text:h[text:level='2']" level="any" format="1.1." />
</xsl:when>
</xsl:choose>
</xsl:template>
-->
<xsl:template match="style:style[@style:family='paragraph']">
<paraStyle>
<xsl:attribute name="name">
<xsl:value-of select="@style:name" />
</xsl:attribute>
<xsl:call-template name="make_indent_paragraph" />
<xsl:call-template name="make_fontnames_paragraph" />
<xsl:call-template name="make_fontsize" />
<!--<xsl:call-template name="make_parent" /> not necessary -
parent styles processed by PyOpenOffice -->
<xsl:call-template name="make_alignment" />
<xsl:call-template name="make_background" />
<xsl:call-template name="make_space_beforeafter" />
<xsl:call-template name="make_fontcolor" />
</paraStyle>
</xsl:template>
<xsl:template name="make_indent_paragraph">
<xsl:variable name="right_indent"><xsl:value-of select="style:properties/@fo:margin-right" /></xsl:variable>
<xsl:variable name="left_indent"><xsl:value-of select="style:properties/@fo:margin-left" /></xsl:variable>
<xsl:if test="not($right_indent='') and boolean(style:properties/@fo:margin-right)">
<xsl:attribute name="rightIndent">
<xsl:value-of select="$right_indent" />
</xsl:attribute>
</xsl:if>
<xsl:if test="not($left_indent='') and boolean(style:properties/@fo:margin-left)">
<xsl:attribute name="leftIndent">
<xsl:value-of select="$left_indent" />
</xsl:attribute>
</xsl:if>
</xsl:template>
<xsl:template name="make_background">
<xsl:variable name="background">
<xsl:value-of select="style:properties/@fo:background-color" />
</xsl:variable>
<xsl:if test="not($background='') and boolean(style:properties/@fo:background-color) and starts-with($background,'#')" >
<xsl:attribute name="backColor">
<xsl:value-of select="$background" />
</xsl:attribute>
</xsl:if>
</xsl:template>
<xsl:template name="make_space_beforeafter">
<xsl:variable name="before">
<xsl:value-of select="style:properties/@fo:margin-top" />
</xsl:variable>
<xsl:variable name="after">
<xsl:value-of select="style:properties/@fo:margin-bottom" />
</xsl:variable>
<xsl:if test="not($before='') and boolean(style:properties/@fo:margin-top)" >
<xsl:attribute name="spaceBefore">
<xsl:value-of select="$before" />
</xsl:attribute>
</xsl:if>
<xsl:if test="not($after='') and boolean(style:properties/@fo:margin-bottom)" >
<xsl:attribute name="spaceAfter">
<xsl:value-of select="$after" />
</xsl:attribute>
</xsl:if>
</xsl:template>
<xsl:template name="make_fontsize">
<xsl:variable name="fontSize">
<xsl:value-of select="style:properties/@fo:font-size" />
</xsl:variable>
<xsl:if test="not($fontSize='') and boolean(style:properties/@fo:font-size)">
<xsl:attribute name="fontSize">
<xsl:value-of select="$fontSize" />
</xsl:attribute>
<xsl:attribute name="leading">
<xsl:value-of select="$fontSize + floor($fontSize div 5) + 1" />
<!--use a standard leading related to the font size -->
</xsl:attribute>
</xsl:if>
</xsl:template>
<!--this template is not needed anymore for "normalized" sxw files -->
<xsl:template name="make_parent">
<xsl:variable name="parent">
<xsl:value-of select="@style:parent-style-name" />
</xsl:variable>
<xsl:if test="not($parent='') and boolean(@style:parent-style-name)">
<xsl:attribute name="parent">
<xsl:value-of select="$parent" />
</xsl:attribute>
</xsl:if>
</xsl:template>
<xsl:template name="make_alignment">
<xsl:variable name="alignment">
<xsl:value-of select="style:properties/@fo:text-align" />
</xsl:variable>
<xsl:if test="not($alignment='') and boolean(style:properties/@fo:text-align)">
<xsl:choose>
<xsl:when test="$alignment='start'">
<xsl:attribute name="alignment">LEFT</xsl:attribute>
</xsl:when>
<xsl:when test="$alignment='center'">
<xsl:attribute name="alignment">CENTER</xsl:attribute>
</xsl:when>
<xsl:when test="$alignment='end'">
<xsl:attribute name="alignment">RIGHT</xsl:attribute>
</xsl:when>
<xsl:when test="$alignment='justify'">
<xsl:attribute name="alignment">JUSTIFY</xsl:attribute>
</xsl:when>
</xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template name="make_fontnames_paragraph">
<xsl:attribute name="fontName">
<xsl:call-template name="make_fontnames">
<xsl:with-param name="fontName" select="style:properties/@style:font-name" />
<xsl:with-param name="fontWeight" select="style:properties/@fo:font-weight" />
<xsl:with-param name="fontStyle" select="style:properties/@fo:font-style" />
</xsl:call-template>
</xsl:attribute>
</xsl:template>
<xsl:template name="make_fontnames">
<!--much too verbose, needs improvement-->
<xsl:param name="fontName" />
<xsl:param name="fontWeight" />
<xsl:param name="fontStyle" />
<xsl:choose>
<xsl:when test="not($fontName='') and boolean($fontName)">
<xsl:choose>
<xsl:when test="contains($fontName,'Courier')">
<xsl:choose>
<xsl:when test="($fontWeight='bold') and ($fontStyle='italic')">
<xsl:text>Courier-BoldOblique</xsl:text>
</xsl:when>
<xsl:when test="($fontWeight='bold') and not ($fontStyle='italic')">
<xsl:text>Courier-Bold</xsl:text>
</xsl:when>
<xsl:when test="not($fontWeight='bold') and ($fontStyle='italic')">
<xsl:text>Courier-Oblique</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>Courier</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="contains($fontName,'Helvetica') or contains($fontName,'Arial') or contains($fontName,'Sans')">
<xsl:choose>
<xsl:when test="($fontWeight='bold') and ($fontStyle='italic')">
<xsl:text>Helvetica-BoldOblique</xsl:text>
</xsl:when>
<xsl:when test="($fontWeight='bold') and not ($fontStyle='italic')">
<xsl:text>Helvetica-Bold</xsl:text>
</xsl:when>
<xsl:when test="not($fontWeight='bold') and ($fontStyle='italic')">
<xsl:text>Helvetica-Oblique</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>Helvetica</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="($fontWeight='bold') and ($fontStyle='italic')">
<xsl:text>Times-BoldItalic</xsl:text>
</xsl:when>
<xsl:when test="($fontWeight='bold') and not ($fontStyle='italic')">
<xsl:text>Times-Bold</xsl:text>
</xsl:when>
<xsl:when test="not($fontWeight='bold') and ($fontStyle='italic')">
<xsl:text>Times-Italic</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>Times-Roman</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<!--Use this as default -->
<xsl:text>Times-Roman</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="make_fontcolor">
<xsl:variable name="textColor">
<xsl:value-of select="style:properties/@fo:color"/>
</xsl:variable>
<xsl:if test="not($textColor='') and boolean(style:properties/@fo:color)">
<xsl:attribute name="textColor">
<xsl:value-of select="$textColor" />
</xsl:attribute>
</xsl:if>
</xsl:template>
<!--
This stylesheet is part of:
PyOpenOffice Version 0.4
Copyright (C) 2005: Martin Simon
Homepage: www.bezirksreiter.de
GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999
-->
</xsl:stylesheet>
@@ -1,3 +0,0 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_l10n_it_report_manager","l10n_it.report account manager","model_account_report_libroiva","account.group_account_manager",1,1,1,1
"access_l10n_it_report_user","l10n_it_report account user","model_account_report_libroiva","account.group_account_user",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_l10n_it_report_manager l10n_it.report account manager model_account_report_libroiva account.group_account_manager 1 1 1 1
3 access_l10n_it_report_user l10n_it_report account user model_account_report_libroiva account.group_account_user 1 1 1 1