diff --git a/account_financial_report_horizontal/report/account_balance_sheet.py b/account_financial_report_horizontal/report/account_balance_sheet.py index 976f6b4b..71396f77 100644 --- a/account_financial_report_horizontal/report/account_balance_sheet.py +++ b/account_financial_report_horizontal/report/account_balance_sheet.py @@ -28,7 +28,7 @@ from openerp.report import report_sxw from openerp.addons.account_financial_report_horizontal.report import ( account_profit_loss ) -from common_report_header import common_report_header +from .common_report_header import common_report_header from openerp.tools.translate import _ diff --git a/account_financial_report_horizontal/report/account_profit_loss.py b/account_financial_report_horizontal/report/account_profit_loss.py index 9f6072a6..16acde40 100644 --- a/account_financial_report_horizontal/report/account_profit_loss.py +++ b/account_financial_report_horizontal/report/account_profit_loss.py @@ -23,7 +23,7 @@ import time from openerp.report import report_sxw -from common_report_header import common_report_header +from .common_report_header import common_report_header from openerp.tools.translate import _ diff --git a/account_financial_report_horizontal/wizard/account_report_balance_sheet.py b/account_financial_report_horizontal/wizard/account_report_balance_sheet.py index 9fa5d1e9..360ba18e 100644 --- a/account_financial_report_horizontal/wizard/account_report_balance_sheet.py +++ b/account_financial_report_horizontal/wizard/account_report_balance_sheet.py @@ -29,6 +29,7 @@ class account_bs_report(orm.TransientModel): This wizard will provide the account balance sheet report by periods, between any two dates. """ + _name = 'account.bs.report' _inherit = "account_financial_report_horizontal.common.account.report" _description = 'Account Balance Sheet Report' diff --git a/account_financial_report_horizontal/wizard/account_report_common.py b/account_financial_report_horizontal/wizard/account_report_common.py index d0173773..35d34b3d 100644 --- a/account_financial_report_horizontal/wizard/account_report_common.py +++ b/account_financial_report_horizontal/wizard/account_report_common.py @@ -43,7 +43,7 @@ class account_common_report(orm.TransientModel): 'filter': fields.selection([ ('filter_no', 'No Filters'), ('filter_date', 'Date'), ('filter_period', 'Periods') - ], + ], "Filter by", required=True), 'period_from': fields.many2one('account.period', 'Start period'), 'period_to': fields.many2one('account.period', 'End period'), @@ -55,7 +55,7 @@ class account_common_report(orm.TransientModel): ], 'Target Moves', required=True ), - } + } def fields_view_get( self, cr, uid, view_id=None, view_type='form', context=None, @@ -87,13 +87,13 @@ class account_common_report(orm.TransientModel): res['value'] = { 'period_from': False, 'period_to': False, 'date_from': False, 'date_to': False - } + } if filter == 'filter_date': res['value'] = { 'period_from': False, 'period_to': False, 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d') - } + } if filter == 'filter_period' and fiscalyear_id: start_period = end_period = False cr.execute(''' @@ -114,7 +114,7 @@ class account_common_report(orm.TransientModel): ORDER BY p.date_stop DESC LIMIT 1) AS period_stop''', ( fiscalyear_id, fiscalyear_id - ) + ) ) periods = [i[0] for i in cr.fetchall()] if periods and len(periods) > 1: @@ -123,7 +123,7 @@ class account_common_report(orm.TransientModel): res['value'] = { 'period_from': start_period, 'period_to': end_period, 'date_from': False, 'date_to': False - } + } return res def _get_account(self, cr, uid, context=None): @@ -187,7 +187,7 @@ class account_common_report(orm.TransientModel): data['form'] = self.read(cr, uid, ids, [ 'date_from', 'date_to', 'fiscalyear_id', 'period_from', 'period_to', 'filter', 'chart_account_id', 'target_move' - ])[0] + ])[0] used_context = self._build_contexts( cr, uid, ids, data, context=context) data['form']['periods'] = used_context.get( diff --git a/account_financial_report_horizontal/wizard/account_report_common_account.py b/account_financial_report_horizontal/wizard/account_report_common_account.py index 50376c48..d4100d6a 100644 --- a/account_financial_report_horizontal/wizard/account_report_common_account.py +++ b/account_financial_report_horizontal/wizard/account_report_common_account.py @@ -32,7 +32,7 @@ class account_common_account_report(orm.TransientModel): 'display_account': fields.selection([ ('bal_all', 'All'), ('bal_movement', 'With movements'), ('bal_solde', 'With balance is not equal to 0'), - ], 'Display accounts', required=True), + ], 'Display accounts', required=True), } _defaults = { diff --git a/account_financial_report_horizontal/wizard/account_report_profit_loss.py b/account_financial_report_horizontal/wizard/account_report_profit_loss.py index 8f2b7033..bb402052 100644 --- a/account_financial_report_horizontal/wizard/account_report_profit_loss.py +++ b/account_financial_report_horizontal/wizard/account_report_profit_loss.py @@ -29,6 +29,7 @@ class account_pl_report(orm.TransientModel): This wizard will provide the account profit and loss report by periods, between any two dates. """ + _inherit = "account_financial_report_horizontal.common.account.report" _name = "account.pl.report" _description = "Account Profit And Loss Report" @@ -57,4 +58,4 @@ class account_pl_report(orm.TransientModel): 'type': 'ir.actions.report.xml', 'report_name': 'account.profit_loss', 'datas': data, - } + } diff --git a/account_financial_report_webkit/report/open_invoices.py b/account_financial_report_webkit/report/open_invoices.py index 4e58d4ad..6ccdcbc1 100644 --- a/account_financial_report_webkit/report/open_invoices.py +++ b/account_financial_report_webkit/report/open_invoices.py @@ -55,8 +55,8 @@ class PartnersOpenInvoicesWebkit(report_sxw.rml_parse, company = self.pool.get('res.users').browse( self.cr, uid, uid, context=context).company_id header_report_name = ' - '.join((_('OPEN INVOICES REPORT'), - company.name, - company.currency_id.name)) + company.name, + company.currency_id.name)) footer_date_time = self.formatLang( str(datetime.today()), date_time=True) diff --git a/account_financial_report_webkit/report/partner_balance.py b/account_financial_report_webkit/report/partner_balance.py index 1e039bb7..66d11a4c 100644 --- a/account_financial_report_webkit/report/partner_balance.py +++ b/account_financial_report_webkit/report/partner_balance.py @@ -42,8 +42,8 @@ class PartnerBalanceWebkit(report_sxw.rml_parse, company = self.pool.get('res.users').browse( self.cr, uid, uid, context=context).company_id header_report_name = ' - '.join((_('PARTNER BALANCE'), - company.name, - company.currency_id.name)) + company.name, + company.currency_id.name)) footer_date_time = self.formatLang( str(datetime.today()), date_time=True) diff --git a/account_financial_report_webkit/report/partners_ledger.py b/account_financial_report_webkit/report/partners_ledger.py index 55c22ce4..ce5e1953 100644 --- a/account_financial_report_webkit/report/partners_ledger.py +++ b/account_financial_report_webkit/report/partners_ledger.py @@ -42,8 +42,8 @@ class PartnersLedgerWebkit(report_sxw.rml_parse, company = self.pool.get('res.users').browse( self.cr, uid, uid, context=context).company_id header_report_name = ' - '.join((_('PARTNER LEDGER'), - company.name, - company.currency_id.name)) + company.name, + company.currency_id.name)) footer_date_time = self.formatLang( str(datetime.today()), date_time=True) diff --git a/account_financial_report_webkit/report/print_journal.py b/account_financial_report_webkit/report/print_journal.py index c2b2f247..60a4c61f 100644 --- a/account_financial_report_webkit/report/print_journal.py +++ b/account_financial_report_webkit/report/print_journal.py @@ -28,8 +28,8 @@ from openerp.tools.translate import _ from openerp import pooler from datetime import datetime -from common_reports import CommonReportHeaderWebkit -from webkit_parser_header_fix import HeaderFooterTextWebKitParser +from .common_reports import CommonReportHeaderWebkit +from .webkit_parser_header_fix import HeaderFooterTextWebKitParser class PrintJournalWebkit(report_sxw.rml_parse, CommonReportHeaderWebkit): diff --git a/account_financial_report_webkit/wizard/balance_common.py b/account_financial_report_webkit/wizard/balance_common.py index 97a67ec5..180a4617 100644 --- a/account_financial_report_webkit/wizard/balance_common.py +++ b/account_financial_report_webkit/wizard/balance_common.py @@ -159,8 +159,8 @@ class AccountBalanceCommonWizard(orm.TransientModel): submenu=submenu) res['fields'].update(self.fields_get(cr, uid, - allfields=self.DYNAMIC_FIELDS, - context=context, write_access=True)) + allfields=self.DYNAMIC_FIELDS, + context=context, write_access=True)) eview = etree.fromstring(res['arch']) placeholder = eview.xpath("//page[@name='placeholder']") diff --git a/account_financial_report_webkit_xls/report/general_ledger_xls.py b/account_financial_report_webkit_xls/report/general_ledger_xls.py index 15212504..666cee75 100644 --- a/account_financial_report_webkit_xls/report/general_ledger_xls.py +++ b/account_financial_report_webkit_xls/report/general_ledger_xls.py @@ -71,8 +71,8 @@ class general_ledger_xls(report_xls): # Title cell_style = xlwt.easyxf(_xs['xls_title']) report_name = ' - '.join([_p.report_name.upper(), - _p.company.partner_id.name, - _p.company.currency_id.name]) + _p.company.partner_id.name, + _p.company.currency_id.name]) c_specs = [ ('report_name', 1, 0, 'text', report_name), ] diff --git a/account_financial_report_webkit_xls/report/open_invoices_xls.py b/account_financial_report_webkit_xls/report/open_invoices_xls.py index 66aec829..172356c7 100644 --- a/account_financial_report_webkit_xls/report/open_invoices_xls.py +++ b/account_financial_report_webkit_xls/report/open_invoices_xls.py @@ -132,8 +132,8 @@ class open_invoices_xls(report_xls): # print the first line "OPEN INVOICE REPORT - db name - Currency def print_title(self, _p, row_position): report_name = ' - '.join([_p.report_name.upper(), - _p.company.partner_id.name, - _p.company.currency_id.name]) + _p.company.partner_id.name, + _p.company.currency_id.name]) c_specs = [('report_name', self.nbr_columns, 0, 'text', report_name), ] row_data = self.xls_row_template(c_specs, [x[0] for x in c_specs]) row_position = self.xls_write_row( diff --git a/account_financial_report_webkit_xls/report/partner_ledger_xls.py b/account_financial_report_webkit_xls/report/partner_ledger_xls.py index e8e4a4e1..d1a7fe1f 100644 --- a/account_financial_report_webkit_xls/report/partner_ledger_xls.py +++ b/account_financial_report_webkit_xls/report/partner_ledger_xls.py @@ -70,8 +70,8 @@ class partner_ledger_xls(report_xls): # Title cell_style = xlwt.easyxf(_xs['xls_title']) report_name = ' - '.join([_p.report_name.upper(), - _p.company.partner_id.name, - _p.company.currency_id.name]) + _p.company.partner_id.name, + _p.company.currency_id.name]) c_specs = [ ('report_name', 1, 0, 'text', report_name), ] diff --git a/account_financial_report_webkit_xls/report/partners_balance_xls.py b/account_financial_report_webkit_xls/report/partners_balance_xls.py index c846f674..c2699100 100644 --- a/account_financial_report_webkit_xls/report/partners_balance_xls.py +++ b/account_financial_report_webkit_xls/report/partners_balance_xls.py @@ -40,8 +40,8 @@ class partners_balance_xls(report_xls): def print_title(self, ws, _p, row_position, xlwt, _xs): cell_style = xlwt.easyxf(_xs['xls_title']) report_name = ' - '.join([_p.report_name.upper(), - _p.company.partner_id.name, - _p.company.currency_id.name]) + _p.company.partner_id.name, + _p.company.currency_id.name]) c_specs = [ ('report_name', 1, 0, 'text', report_name), ] diff --git a/account_financial_report_webkit_xls/report/trial_balance_xls.py b/account_financial_report_webkit_xls/report/trial_balance_xls.py index ec479f4f..27f08ec4 100644 --- a/account_financial_report_webkit_xls/report/trial_balance_xls.py +++ b/account_financial_report_webkit_xls/report/trial_balance_xls.py @@ -54,8 +54,8 @@ class trial_balance_xls(report_xls): # Title cell_style = xlwt.easyxf(_xs['xls_title']) report_name = ' - '.join([_p.report_name.upper(), - _p.company.partner_id.name, - _p.company.currency_id.name]) + _p.company.partner_id.name, + _p.company.currency_id.name]) c_specs = [ ('report_name', 1, 0, 'text', report_name), ] diff --git a/account_journal_report_xls/report/nov_account_journal.py b/account_journal_report_xls/report/nov_account_journal.py index 2b0278c3..502dc16b 100644 --- a/account_journal_report_xls/report/nov_account_journal.py +++ b/account_journal_report_xls/report/nov_account_journal.py @@ -207,11 +207,11 @@ class nov_journal_print(report_sxw.rml_parse): if journal.type in ('sale', 'sale_refund', 'purchase', 'purchase_refund'): [x.update({'docname': (_('Invoice') + ': ' + x['inv_number']) - or (_('Voucher') + ': ' + x['voucher_number']) or '-'}) + or (_('Voucher') + ': ' + x['voucher_number']) or '-'}) for x in lines] elif journal.type in ('bank', 'cash'): [x.update({'docname': (_('Statement') + ': ' + x['st_number']) - or (_('Voucher') + ': ' + x['voucher_number']) or '-'}) + or (_('Voucher') + ': ' + x['voucher_number']) or '-'}) for x in lines] else: code_string = j_obj._report_xls_document_extra(