[REF] l10n_*:Correct warning from buildbot

bzr revid: ara@tinyerp.com-20101111061102-022fskf3gtew1846
This commit is contained in:
ARA (OpenERP) 2010-11-11 11:41:02 +05:30
parent b6f2173069
commit 67ea374f16
12 changed files with 195 additions and 184 deletions

View File

@ -1,20 +1,21 @@
# -*- encoding: utf-8 -*-
#################################################################################
# #
# Copyright (C) 2009 Renato Lima - Akretion #
# #
#This program is free software: you can redistribute it and/or modify #
#it under the terms of the GNU General Public License as published by #
#the Free Software Foundation, either version 3 of the License, or #
#(at your option) any later version. #
# #
#This program is distributed in the hope that it will be useful, #
#but WITHOUT ANY WARRANTY; without even the implied warranty of #
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
#GNU General Public License for more details. #
# #
#You should have received a copy of the GNU General Public License #
#along with this program. If not, see <http://www.gnu.org/licenses/>. #
#
# Copyright (C) 2009 Renato Lima - Akretion
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#################################################################################
{
@ -25,8 +26,8 @@
'website' : 'http://openerpbrasil.org',
'version' : '0.6',
'depends' : [
'account',
'account_chart',
'account',
'account_chart',
],
'init_xml': [
],
@ -40,4 +41,4 @@
'installable': True
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,11 +1,25 @@
-
In order to test the PDF reports defined on a l10n_ch, we will create a Invoice Record
-
!record {model: account.invoice, id: test_invoice_1}:
currency_id: base.EUR
company_id: base.main_company
address_invoice_id: base.res_partner_address_tang
partner_id: base.res_partner_asus
state: draft
type: out_invoice
account_id: account.a_recv
name: Test invoice 1
address_contact_id: base.res_partner_address_tang
-
In order to test the PDF reports defined on a l10n_ch, we will print BVR Report
-
!python {model: account.invoice}: |
import netsvc, tools, os
run_str = 'cp ' + tools.config['addons_path'] + '/l10n_ch/report/ocrbb.ttf' + ' ' + '/tmp/ocrbb.ttf'
run_str = 'cp ' + tools.config['addons_path'] + '/l10n_ch/report/ocrbb.ttf' + ' ' + '/tmp/ocrbb.ttf'
os.system(run_str)
(data, format) = netsvc.LocalService('report.l10n_ch.bvr').create(cr, uid, [ref('account.test_invoice_1')], {}, {})
(data, format) = netsvc.LocalService('report.l10n_ch.bvr').create(cr, uid, [ref('test_invoice_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_report.'+format), 'wb+').write(data)
@ -14,6 +28,6 @@
-
!python {model: account.invoice}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.l10n_ch.invoice.bvr').create(cr, uid, [ref('account.test_invoice_1')], {}, {})
(data, format) = netsvc.LocalService('report.l10n_ch.invoice.bvr').create(cr, uid, [ref('test_invoice_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_invoice_report.'+format), 'wb+').write(data)

View File

@ -1,35 +1,35 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# __openerp__.py
# l10n_cr_account
# First author: Carlos Vásquez <carlos.vasquez@clearcorp.co.cr> (ClearCorp S.A.)
# Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# __openerp__.py
# l10n_cr_account
# First author: Carlos Vásquez <carlos.vasquez@clearcorp.co.cr> (ClearCorp S.A.)
# Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# The views and conclusions contained in the software and documentation are those of the
# authors and should not be interpreted as representing official policies, either expressed
# or implied, of ClearCorp S.A..
#
#
# THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# The views and conclusions contained in the software and documentation are those of the
# authors and should not be interpreted as representing official policies, either expressed
# or implied, of ClearCorp S.A..
#
##############################################################################
{
@ -46,7 +46,7 @@
* account.tax.template
* account.tax.code.template
* account.chart.template
Everything is in English with Spanish translation. Further translations are welcome, please go to
http://translations.launchpad.net/openerp-costa-rica
""",
@ -66,3 +66,5 @@
'installable': True,
'active': False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,186 +1,189 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="False">
<!-- VAT Code Definitions -->
<!-- Invoiced VAT -->
<!-- Input VAT -->
<record id="vat_code_chart_root" model="account.tax.code.template">
<field name="name">Πίνακες φόρου</field>
</record>
<record id="vat_code_balance_net" model="account.tax.code.template">
<field name="name">Υπόλοιπο ΦΠΑ </field>
<field name="parent_id" ref="vat_code_chart_root"/>
<field name="code">501-511</field>
<field name="code">501-511</field>
</record>
<record id="vat_code_input" model="account.tax.code.template">
<field name="name">ΦΠΑ Εισροών</field>
<field name="parent_id" ref="vat_code_balance_net"/>
</record>
<record id="vat_code_input_restgr" model="account.tax.code.template">
<record id="vat_code_input_restgr" model="account.tax.code.template">
<field name="name">Λοιπή Ελλάδα εκτός Αιγαίου</field>
<field name="parent_id" ref="vat_code_input"/>
</record>
<record id="vat_code_input_9" model="account.tax.code.template">
<field name="name">ΦΠΑ Εισροών 9%</field>
<field name="code">371</field>
<field name="parent_id" ref="vat_code_input_restgr"/>
</record>
<record id="vat_code_input_4" model="account.tax.code.template">
<field name="name">ΦΠΑ Εισροών 4,5%</field>
<field name="code">372</field>
<field name="parent_id" ref="vat_code_input_restgr"/>
</record>
<record id="vat_code_input_19" model="account.tax.code.template">
<field name="name">ΦΠΑ Εισροών 19%</field>
<field name="code">373</field>
<field name="code">371</field>
<field name="parent_id" ref="vat_code_input_restgr"/>
</record>
<record id="vat_code_input_aeg" model="account.tax.code.template">
<record id="vat_code_input_4" model="account.tax.code.template">
<field name="name">ΦΠΑ Εισροών 4,5%</field>
<field name="code">372</field>
<field name="parent_id" ref="vat_code_input_restgr"/>
</record>
<record id="vat_code_input_19" model="account.tax.code.template">
<field name="name">ΦΠΑ Εισροών 19%</field>
<field name="code">373</field>
<field name="parent_id" ref="vat_code_input_restgr"/>
</record>
<record id="vat_code_input_aeg" model="account.tax.code.template">
<field name="name">Νησιά Αιγαίου</field>
<field name="parent_id" ref="vat_code_input"/>
</record>
<record id="vat_code_input_6" model="account.tax.code.template">
<field name="name">ΦΠΑ Εισροών 6%</field>
<field name="code">374</field>
<field name="code">374</field>
<field name="parent_id" ref="vat_code_input_aeg"/>
</record>
<record id="vat_code_input_3" model="account.tax.code.template">
<field name="name">ΦΠΑ Εισροών 3%</field>
<field name="code">375</field>
<field name="code">375</field>
<field name="parent_id" ref="vat_code_input_aeg"/>
</record>
<record id="vat_code_input_13" model="account.tax.code.template">
<record id="vat_code_input_13" model="account.tax.code.template">
<field name="name">ΦΠΑ Εισροών 13%</field>
<field name="code">376</field>
<field name="code">376</field>
<field name="parent_id" ref="vat_code_input_aeg"/>
</record>
<record id="vat_code_output" model="account.tax.code.template">
<field name="name">ΦΠΑ Εκροών</field>
<field name="parent_id" ref="vat_code_balance_net"/>
</record>
<record id="vat_code_output_restgr" model="account.tax.code.template">
<record id="vat_code_output_restgr" model="account.tax.code.template">
<field name="name">Λοιπή Ελλάδα εκτός Αιγαίου</field>
<field name="parent_id" ref="vat_code_output"/>
</record>
<record id="vat_code_output_9" model="account.tax.code.template">
<field name="name">ΦΠΑ Εκροών 9%</field>
<field name="code">331</field>
<field name="parent_id" ref="vat_code_output_restgr"/>
</record>
<record id="vat_code_output_4" model="account.tax.code.template">
<field name="name">ΦΠΑ Εκροών 4,5%</field>
<field name="code">332</field>
<field name="parent_id" ref="vat_code_output_restgr"/>
</record>
<record id="vat_code_output_19" model="account.tax.code.template">
<field name="name">ΦΠΑ Εκροών 19%</field>
<field name="code">333</field>
<field name="code">331</field>
<field name="parent_id" ref="vat_code_output_restgr"/>
</record>
<record id="vat_code_output_aeg" model="account.tax.code.template">
<record id="vat_code_output_4" model="account.tax.code.template">
<field name="name">ΦΠΑ Εκροών 4,5%</field>
<field name="code">332</field>
<field name="parent_id" ref="vat_code_output_restgr"/>
</record>
<record id="vat_code_output_19" model="account.tax.code.template">
<field name="name">ΦΠΑ Εκροών 19%</field>
<field name="code">333</field>
<field name="parent_id" ref="vat_code_output_restgr"/>
</record>
<record id="vat_code_output_aeg" model="account.tax.code.template">
<field name="name">Νησιά Αιγαίου</field>
<field name="parent_id" ref="vat_code_output"/>
</record>
<record id="vat_code_output_6" model="account.tax.code.template">
<field name="name">ΦΠΑ Εκροών 6%</field>
<field name="code">334</field>
<field name="code">334</field>
<field name="parent_id" ref="vat_code_output_aeg"/>
</record>
<record id="vat_code_output_3" model="account.tax.code.template">
<field name="name">ΦΠΑ Εκροών 3%</field>
<field name="code">335</field>
<field name="code">335</field>
<field name="parent_id" ref="vat_code_output_aeg"/>
</record>
<record id="vat_code_output_13" model="account.tax.code.template">
<record id="vat_code_output_13" model="account.tax.code.template">
<field name="name">ΦΠΑ Εκροών 13%</field>
<field name="code">336</field>
<field name="code">336</field>
<field name="parent_id" ref="vat_code_output_aeg"/>
</record>
<record id="sum_output" model="account.tax.code.template">
<field name="name">Σύνολο Εκροών</field>
<field name="code">311</field>
<field name="code">311</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
<record id="sum_output_307" model="account.tax.code.template">
<field name="name">Σύνολο Φορολ/τέων Εκροών</field>
<field name="code">307</field>
<field name="code">307</field>
<field name="parent_id" ref="sum_output"/>
</record>
<record id="output_301" model="account.tax.code.template">
<field name="name">Εκροές 9%</field>
<field name="code">301</field>
<field name="code">301</field>
<field name="parent_id" ref="sum_output_307"/>
</record>
<record id="output_302" model="account.tax.code.template">
<field name="name">Εκροές 4.5%</field>
<field name="code">302</field>
<field name="code">302</field>
<field name="parent_id" ref="sum_output_307"/>
</record>
<record id="output_303" model="account.tax.code.template">
<field name="name">Εκροές 19%</field>
<field name="code">303</field>
<field name="code">303</field>
<field name="parent_id" ref="sum_output_307"/>
</record>
<!-- Other tax columns -->
<record id="sum_input" model="account.tax.code.template">
<record id="sum_input" model="account.tax.code.template">
<field name="name">Σύνολο Φορολ/τέων εισροών</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
<record id="sum_input_358" model="account.tax.code.template">
<field name="name">Σύνολο Φορολ/τέων εισροών</field>
<field name="code">358</field>
<field name="code">358</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
<record id="input_351" model="account.tax.code.template">
<field name="name">Εισροές 9%</field>
<field name="code">351</field>
<field name="code">351</field>
<field name="parent_id" ref="sum_input_358"/>
</record>
<record id="input_352" model="account.tax.code.template">
<field name="name">Εισροές 4.5%</field>
<field name="code">352</field>
<field name="code">352</field>
<field name="parent_id" ref="sum_input_358"/>
</record>
<record id="input_353" model="account.tax.code.template">
<field name="name">Εισροές 19%</field>
<field name="code">353</field>
<field name="code">353</field>
<field name="parent_id" ref="sum_input_358"/>
</record>
<!-- Chart Template -->
<record id="l10n_gr_chart_template" model="account.chart.template">
<field name="name">Πρότυπο Ελληνικού Λογιστικού Σχεδίου</field>
<field name="account_root_id" ref="chartgr_0"/>
@ -194,39 +197,38 @@
<!-- VAT Codes -->
<!-- Purchases + Input VAT -->
<record id="ivat19" model="account.tax.template">
<field name="chart_template_id" ref="l10n_gr_chart_template"/>
<field name="name">Εισροές 19</field>
<field eval="0.19" name="amount"/>
<field name="type">percent</field>
<field name="type_tax_use">sale</field>
<field name="type_tax_use">sale</field>
<field name="account_collected_id" ref="chartgr_54_00"/>
<field name="account_paid_id" ref="chartgr_54_00"/>
<field name="base_code_id" ref="input_353"/>
<field name="tax_code_id" ref="vat_code_input_19"/>
<!-- refunds: <field name="ref_base_code_id" ref="vat_code_purch_S"/>
<field name="ref_tax_code_id" ref="vat_code_input_S"/> -->
</record>
<!-- *-* revise the ΦΠΑ.. -->
<!-- *-* revise the ΦΠΑ.. -->
<record id="ovat19" model="account.tax.template">
<field name="chart_template_id" ref="l10n_gr_chart_template"/>
<field name="name">Εκροές 19</field>
<field eval="0.19" name="amount"/>
<field name="type">percent</field>
<field name="type_tax_use">purchase</field>
<field name="type_tax_use">purchase</field>
<field name="account_collected_id" ref="chartgr_54_00"/>
<field name="account_paid_id" ref="chartgr_54_00"/>
<field name="base_code_id" ref="output_303"/>
<field name="tax_code_id" ref="vat_code_output_19"/>
<!-- refunds: <field name="ref_base_code_id" ref="vat_code_purch_S"/>
<field name="ref_tax_code_id" ref="vat_code_input_S"/> -->
</record>
</data>
</openerp>

View File

@ -1,12 +1,12 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Italian OpenERP accounting module
# Italian OpenERP accounting module
# Copyright (C) 2010 Servabit srl (<http://www.servabit.it>) and the
# Italian OpenERP Community (<http://www.openerp-italia.com>)
#
# ########################################################################
# OpenERP, Open Source Management Solution
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
@ -29,5 +29,4 @@ import libroIVA
import report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,11 +1,11 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Italian OpenERP accounting module
# Copyright (C) 2010 Servabit srl (<http://www.servabit.it>)
# Italian OpenERP accounting module
# Copyright (C) 2010 Servabit srl (<http://www.servabit.it>)
#
# Developed by the servabit OpenERP team: openerp@servabit.it
#
#
# Some parts have been taken from modules by the:
# Italian OpenERP Community (<http://www.openerp-italia.com>)
# Some files follows the ideas in the l10n_fr module,
@ -13,7 +13,7 @@
#
#############################################################################
#
# OpenERP, Open Source Management Solution
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
@ -31,29 +31,29 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
"name" : "Italy - Chart of Accounts By Servabit",
"version" : "0.4",
"author" : "Servabit srl",
"name": "Italy - Chart of Accounts By Servabit",
"version": "0.4",
"author": "Servabit srl",
"website": "http://www.servabit.it",
"category" : "Localisation/Account Charts",
"category": "Localisation/Account Charts",
"description": "This is a module to manage the accounting chart for Italy (CC2424 Profile) for a service company.",
"depends" : ["account", "base_iban", "base_vat", "account_chart"],
"demo_xml" : [],
"update_xml" : ['tipoconti_servabit.xml',
'pianoconti_servabit.xml',
"depends": ["account", "base_iban", "base_vat", "account_chart"],
"demo_xml": [],
"update_xml": ['tipoconti_servabit.xml',
'pianoconti_servabit.xml',
'account_tax_template.xml',
'journals.xml',
'default_accounts.xml',
'anno_fiscale.xml',
'l10n_chart_it_servabit_wizard.xml',
'report.xml',
'libroIVA_view.xml',
'libroIVA_menu.xml',
'security/ir.model.access.csv',
'libroIVA_view.xml',
'libroIVA_menu.xml',
'security/ir.model.access.csv',
],
"active": False,
"installable": True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -21,10 +21,10 @@
##############################################################################
# ##################################################################################
# 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
# ##################################################################################
###################################################################################
# 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

View File

@ -1,2 +1,4 @@
import libroIVA_credito
import libroIVA_debito
import libroIVA_debito
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,26 +1,24 @@
import datetime
import time
from report import report_sxw
from osv import osv
import pooler
class l10n_chart_it_servabit_report_libroIVA_credito(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(l10n_chart_it_servabit_report_libroIVA_credito,self).__init__(cr,uid,name,context)
self.localcontext.update({
'time' : time,
'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')
@ -29,13 +27,13 @@ class l10n_chart_it_servabit_report_libroIVA_credito(report_sxw.rml_parse):
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
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')
@ -47,7 +45,7 @@ class l10n_chart_it_servabit_report_libroIVA_credito(report_sxw.rml_parse):
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')
@ -72,8 +70,8 @@ class l10n_chart_it_servabit_report_libroIVA_credito(report_sxw.rml_parse):
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_servabit_report_libroIVA_credito,header=False)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,27 +1,25 @@
import datetime
import time
from report import report_sxw
from osv import osv
import pooler
class l10n_chart_it_servabit_report_libroIVA_debito(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(l10n_chart_it_servabit_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,
'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
#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')
@ -30,13 +28,13 @@ class l10n_chart_it_servabit_report_libroIVA_debito(report_sxw.rml_parse):
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
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')
@ -48,7 +46,7 @@ class l10n_chart_it_servabit_report_libroIVA_debito(report_sxw.rml_parse):
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')
@ -73,8 +71,8 @@ class l10n_chart_it_servabit_report_libroIVA_debito(report_sxw.rml_parse):
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_servabit_report_libroIVA_debito,header=False)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
@ -20,12 +20,7 @@
#
##############################################################################
from mx import DateTime
import time
from osv import fields, osv
import pooler
class l10n_ma_report(osv.osv):
_name = 'l10n.ma.report'