diff --git a/addons/l10n_br/__openerp__.py b/addons/l10n_br/__openerp__.py index c2ff1c0e66e..f173b749cd6 100644 --- a/addons/l10n_br/__openerp__.py +++ b/addons/l10n_br/__openerp__.py @@ -19,26 +19,22 @@ ################################################################################# { - 'name' : 'Brazilian Localization', - 'description' : 'Brazilian Localization', - 'category' : 'Localisation/Account Charts', - 'author' : 'OpenERP Brasil', - 'website' : 'http://openerpbrasil.org', - 'version' : '0.6', - 'depends' : [ - 'account', - 'account_chart', - ], - 'init_xml': [ - ], - 'update_xml' : [ + 'name': 'Brazilian Localization', + 'description': 'Brazilian Localization', + 'category': 'Localisation/Account Charts', + 'author': 'OpenERP Brasil', + 'website': 'http://openerpbrasil.org', + 'version': '0.6', + 'depends': ['account','account_chart'], + 'init_xml': [], + 'update_xml': [ 'data/account.account.type.csv', 'data/account.tax.code.template.csv', 'data/account.account.template.csv', 'data/l10n_br_account_chart_template.xml', - 'data/account_tax_template.xml', + 'data/account_tax_template.xml' ], - 'installable': True + 'installable': True, } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/l10n_cr/__openerp__.py b/addons/l10n_cr/__openerp__.py index 462c9d3cfae..e826de5ebd0 100644 --- a/addons/l10n_cr/__openerp__.py +++ b/addons/l10n_cr/__openerp__.py @@ -40,17 +40,17 @@ 'website': 'http://clearcorp.co.cr', 'category': 'Localisation/Account Charts', 'description': """Chart of accounts for Costa Rica - Includes: - * account.type - * account.account.template - * account.tax.template - * account.tax.code.template - * account.chart.template + Includes: + * account.type + * account.account.template + * 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 +Everything is in English with Spanish translation. Further translations are welcome, please go to +http://translations.launchpad.net/openerp-costa-rica """, - 'depends': ['account','account_chart', 'base'], + 'depends': ['account', 'account_chart', 'base'], 'init_xml': [], 'demo_xml': [], 'update_xml': [ @@ -61,7 +61,7 @@ 'data/account_chart_template.xml', 'data/account_tax_template.xml', 'l10n_wizard.xml' - ], + ], 'license': 'Other OSI approved licence', 'installable': True, 'active': False, diff --git a/addons/l10n_it/__openerp__.py b/addons/l10n_it/__openerp__.py index 5e4d2d5687e..a059b7a64e0 100755 --- a/addons/l10n_it/__openerp__.py +++ b/addons/l10n_it/__openerp__.py @@ -38,21 +38,22 @@ "author": "Servabit srl", "website": "http://www.servabit.it", "category": "Localisation/Account Charts", - "description": "This is a module to manage the accounting chart for Italy (CC2424 Profile) for a service company.", + "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', - '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', - ], + "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' + ], "active": False, "installable": True, } diff --git a/addons/l10n_it/libroIVA.py b/addons/l10n_it/libroIVA.py index f33f969d297..92e3b7ccc15 100755 --- a/addons/l10n_it/libroIVA.py +++ b/addons/l10n_it/libroIVA.py @@ -37,15 +37,12 @@ class l10n_chart_it_servabit_report_libroIVA (osv.osv): _columns = { 'name': fields.char('Fiscal year',size=64), - 'company_id': fields.many2one('res.company', 'Company'), + '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 - )""") + cr.execute("""CREATE VIEW account_report_libroiva AS (SELECT id, name, company_id FROM account_fiscalyear)""") l10n_chart_it_servabit_report_libroIVA() - +# 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 a74c4ffadb7..7697d4d9033 100755 --- a/addons/l10n_it/report/libroIVA_credito.py +++ b/addons/l10n_it/report/libroIVA_credito.py @@ -8,70 +8,67 @@ 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, - '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') - 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 + #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 + #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 + 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_servabit_report_libroIVA_credito,header=False) +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 b6e38bf4f35..1a022424144 100755 --- a/addons/l10n_it/report/libroIVA_debito.py +++ b/addons/l10n_it/report/libroIVA_debito.py @@ -2,77 +2,72 @@ import time from report import report_sxw 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') - 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 + #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 + #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 + 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_servabit_report_libroIVA_debito,header=False) +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