From 67ea374f16f4a22a1d6b5a24dd921f0043efc2c6 Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Thu, 11 Nov 2010 11:41:02 +0530 Subject: [PATCH] [REF] l10n_*:Correct warning from buildbot bzr revid: ara@tinyerp.com-20101111061102-022fskf3gtew1846 --- addons/l10n_br/__openerp__.py | 37 +++--- addons/l10n_ch/test/l10n_ch_report.yml | 20 ++- addons/l10n_cr/__openerp__.py | 56 ++++---- addons/l10n_gr/account_tax.xml | 148 +++++++++++----------- addons/l10n_it/__init__.py | 7 +- addons/l10n_it/__openerp__.py | 34 ++--- addons/l10n_it/libroIVA.py | 8 +- addons/l10n_it/productcateg.xml | 0 addons/l10n_it/report/__init__.py | 4 +- addons/l10n_it/report/libroIVA_credito.py | 24 ++-- addons/l10n_it/report/libroIVA_debito.py | 34 +++-- addons/l10n_ma/l10n_ma.py | 7 +- 12 files changed, 195 insertions(+), 184 deletions(-) delete mode 100755 addons/l10n_it/productcateg.xml diff --git a/addons/l10n_br/__openerp__.py b/addons/l10n_br/__openerp__.py index 9eb52a40fab..c2ff1c0e66e 100644 --- a/addons/l10n_br/__openerp__.py +++ b/addons/l10n_br/__openerp__.py @@ -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 . # +# +# 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 . +# ################################################################################# { @@ -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: \ No newline at end of file diff --git a/addons/l10n_ch/test/l10n_ch_report.yml b/addons/l10n_ch/test/l10n_ch_report.yml index a8a976bc424..5b2a636813e 100644 --- a/addons/l10n_ch/test/l10n_ch_report.yml +++ b/addons/l10n_ch/test/l10n_ch_report.yml @@ -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) diff --git a/addons/l10n_cr/__openerp__.py b/addons/l10n_cr/__openerp__.py index 57d088cfcc4..462c9d3cfae 100644 --- a/addons/l10n_cr/__openerp__.py +++ b/addons/l10n_cr/__openerp__.py @@ -1,35 +1,35 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# __openerp__.py -# l10n_cr_account -# First author: Carlos Vásquez (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 (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 ``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 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 ``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 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: \ No newline at end of file diff --git a/addons/l10n_gr/account_tax.xml b/addons/l10n_gr/account_tax.xml index c48233d87a3..e6e673a90e2 100755 --- a/addons/l10n_gr/account_tax.xml +++ b/addons/l10n_gr/account_tax.xml @@ -1,186 +1,189 @@ - + - + - + - + - + Πίνακες φόρου - + Υπόλοιπο ΦΠΑ - 501-511 + 501-511 - + ΦΠΑ Εισροών - - + + Λοιπή Ελλάδα εκτός Αιγαίου ΦΠΑ Εισροών 9% - 371 - - - - - ΦΠΑ Εισροών 4,5% - 372 - - - - - ΦΠΑ Εισροών 19% - 373 + 371 - + + ΦΠΑ Εισροών 4,5% + 372 + + + + + ΦΠΑ Εισροών 19% + 373 + + + + Νησιά Αιγαίου ΦΠΑ Εισροών 6% - 374 + 374 - + ΦΠΑ Εισροών 3% - 375 + 375 - - + + ΦΠΑ Εισροών 13% - 376 + 376 - + ΦΠΑ Εκροών - - + + Λοιπή Ελλάδα εκτός Αιγαίου ΦΠΑ Εκροών 9% - 331 - - - - - ΦΠΑ Εκροών 4,5% - 332 - - - - - ΦΠΑ Εκροών 19% - 333 + 331 - + + ΦΠΑ Εκροών 4,5% + 332 + + + + + ΦΠΑ Εκροών 19% + 333 + + + + Νησιά Αιγαίου ΦΠΑ Εκροών 6% - 334 + 334 - + ΦΠΑ Εκροών 3% - 335 + 335 - - + + ΦΠΑ Εκροών 13% - 336 + 336 Σύνολο Εκροών - 311 + 311 Σύνολο Φορολ/τέων Εκροών - 307 + 307 Εκροές 9% - 301 + 301 + Εκροές 4.5% - 302 + 302 + Εκροές 19% - 303 + 303 - + Σύνολο Φορολ/τέων εισροών Σύνολο Φορολ/τέων εισροών - 358 + 358 Εισροές 9% - 351 + 351 + Εισροές 4.5% - 352 + 352 Εισροές 19% - 353 + 353 - + Πρότυπο Ελληνικού Λογιστικού Σχεδίου @@ -194,39 +197,38 @@ - + Εισροές 19 percent - sale + sale - + - - + + Εκροές 19 percent - purchase + purchase - - - + + \ No newline at end of file diff --git a/addons/l10n_it/__init__.py b/addons/l10n_it/__init__.py index 6a6278762b2..adfc1887c32 100755 --- a/addons/l10n_it/__init__.py +++ b/addons/l10n_it/__init__.py @@ -1,12 +1,12 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# Italian OpenERP accounting module +# Italian OpenERP accounting module # Copyright (C) 2010 Servabit srl () and the # Italian OpenERP Community () # # ######################################################################## -# OpenERP, Open Source Management Solution +# OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (). 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: \ No newline at end of file diff --git a/addons/l10n_it/__openerp__.py b/addons/l10n_it/__openerp__.py index f7275688715..5e4d2d5687e 100755 --- a/addons/l10n_it/__openerp__.py +++ b/addons/l10n_it/__openerp__.py @@ -1,11 +1,11 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# Italian OpenERP accounting module -# Copyright (C) 2010 Servabit srl () +# Italian OpenERP accounting module +# Copyright (C) 2010 Servabit srl () # # Developed by the servabit OpenERP team: openerp@servabit.it -# +# # Some parts have been taken from modules by the: # Italian OpenERP Community () # 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 (). All Rights Reserved # $Id$ # @@ -31,29 +31,29 @@ # along with this program. If not, see . # ############################################################################## + { - "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: \ No newline at end of file diff --git a/addons/l10n_it/libroIVA.py b/addons/l10n_it/libroIVA.py index 7485c6cf2b3..f33f969d297 100755 --- a/addons/l10n_it/libroIVA.py +++ b/addons/l10n_it/libroIVA.py @@ -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 diff --git a/addons/l10n_it/productcateg.xml b/addons/l10n_it/productcateg.xml deleted file mode 100755 index e69de29bb2d..00000000000 diff --git a/addons/l10n_it/report/__init__.py b/addons/l10n_it/report/__init__.py index be32155c675..ad438e9351f 100755 --- a/addons/l10n_it/report/__init__.py +++ b/addons/l10n_it/report/__init__.py @@ -1,2 +1,4 @@ import libroIVA_credito -import libroIVA_debito \ No newline at end of file +import libroIVA_debito + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/l10n_it/report/libroIVA_credito.py b/addons/l10n_it/report/libroIVA_credito.py index 5a7c5245da1..a74c4ffadb7 100755 --- a/addons/l10n_it/report/libroIVA_credito.py +++ b/addons/l10n_it/report/libroIVA_credito.py @@ -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: \ No newline at end of file diff --git a/addons/l10n_it/report/libroIVA_debito.py b/addons/l10n_it/report/libroIVA_debito.py index 4fe14db714d..b6e38bf4f35 100755 --- a/addons/l10n_it/report/libroIVA_debito.py +++ b/addons/l10n_it/report/libroIVA_debito.py @@ -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: \ No newline at end of file diff --git a/addons/l10n_ma/l10n_ma.py b/addons/l10n_ma/l10n_ma.py index be027f75f13..a8e0dd42687 100644 --- a/addons/l10n_ma/l10n_ma.py +++ b/addons/l10n_ma/l10n_ma.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution +# OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). 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'