Browse Source

[FIX] PEP8 + pylint

pull/176/head
Pedro M. Baeza 9 years ago
parent
commit
4f38153c97
  1. 3
      account_chart_report/__openerp__.py
  2. 4
      account_financial_report/__openerp__.py
  3. 3
      account_financial_report/model/__init__.py
  4. 2
      account_financial_report/model/account_financial_report.py
  5. 3
      account_financial_report/model/res_company.py
  6. 2
      account_financial_report/report/__init__.py
  7. 63
      account_financial_report/report/parser.py
  8. 49
      account_financial_report/wizard/wizard.py
  9. 1
      account_financial_report_horizontal/__openerp__.py
  10. 6
      account_financial_report_horizontal/report/account_balance_sheet.py
  11. 5
      account_financial_report_horizontal/report/account_profit_loss.py
  12. 2
      account_financial_report_webkit/__init__.py
  13. 2
      account_financial_report_webkit/__openerp__.py
  14. 2
      account_financial_report_webkit/account_move_line.py
  15. 10
      account_financial_report_webkit/report/aged_partner_balance.py
  16. 2
      account_financial_report_webkit/report/common_balance_reports.py
  17. 2
      account_financial_report_webkit/report/common_partner_balance_reports.py
  18. 2
      account_financial_report_webkit/report/common_partner_reports.py
  19. 6
      account_financial_report_webkit/report/common_reports.py
  20. 2
      account_financial_report_webkit/report/general_ledger.py
  21. 6
      account_financial_report_webkit/report/open_invoices.py
  22. 2
      account_financial_report_webkit/report/partner_balance.py
  23. 6
      account_financial_report_webkit/report/partners_ledger.py
  24. 2
      account_financial_report_webkit/report/print_journal.py
  25. 2
      account_financial_report_webkit/report/trial_balance.py
  26. 5
      account_financial_report_webkit/report/webkit_parser_header_fix.py
  27. 2
      account_financial_report_webkit/wizard/general_ledger_wizard.py
  28. 2
      account_financial_report_webkit/wizard/open_invoices_wizard.py
  29. 2
      account_financial_report_webkit/wizard/partner_balance_wizard.py
  30. 2
      account_financial_report_webkit/wizard/partners_ledger_wizard.py
  31. 2
      account_financial_report_webkit/wizard/trial_balance_wizard.py
  32. 2
      account_financial_report_webkit_xls/__init__.py
  33. 2
      account_financial_report_webkit_xls/__openerp__.py
  34. 2
      account_financial_report_webkit_xls/report/__init__.py
  35. 2
      account_financial_report_webkit_xls/report/general_ledger_xls.py
  36. 35
      account_financial_report_webkit_xls/report/open_invoices_xls.py
  37. 2
      account_financial_report_webkit_xls/report/partner_ledger_xls.py
  38. 9
      account_financial_report_webkit_xls/report/partners_balance_xls.py
  39. 7
      account_financial_report_webkit_xls/report/trial_balance_xls.py
  40. 2
      account_financial_report_webkit_xls/wizard/__init__.py
  41. 2
      account_financial_report_webkit_xls/wizard/general_ledger_wizard.py
  42. 2
      account_financial_report_webkit_xls/wizard/open_invoices_wizard.py
  43. 2
      account_financial_report_webkit_xls/wizard/partners_balance_wizard.py
  44. 2
      account_financial_report_webkit_xls/wizard/partners_ledger_wizard.py
  45. 2
      account_financial_report_webkit_xls/wizard/trial_balance_wizard.py
  46. 2
      account_journal_report_xls/__init__.py
  47. 2
      account_journal_report_xls/__openerp__.py
  48. 2
      account_journal_report_xls/account_journal.py
  49. 2
      account_journal_report_xls/report/__init__.py
  50. 22
      account_journal_report_xls/report/nov_account_journal.py
  51. 2
      account_journal_report_xls/report/nov_account_journal_xls.py
  52. 2
      account_journal_report_xls/wizard/__init__.py
  53. 2
      account_journal_report_xls/wizard/print_journal_wizard.py
  54. 2
      account_partner_aged_statement_webkit/__init__.py
  55. 6
      account_partner_aged_statement_webkit/__openerp__.py
  56. 2
      account_partner_aged_statement_webkit/partner_aged_statement.py
  57. 2
      account_partner_aged_statement_webkit/report/__init__.py
  58. 4
      account_partner_aged_statement_webkit/report/partner_aged_statement_report.py
  59. 2
      account_partner_aged_statement_webkit/report/supplier_aged_statement_report.py
  60. 2
      account_partner_aged_statement_webkit/tests/test_aged_statement.py

3
account_chart_report/__openerp__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
###############################################################################
#
# OpenERP, Open Source Management Solution
@ -44,6 +44,7 @@ Contributors
'base',
'account',
],
"license": 'AGPL-3',
'data': [
'account_report.xml',
'wizard/account_report_chart_of_account.xml',

4
account_financial_report/__openerp__.py

@ -1,7 +1,6 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
# All Rights Reserved
# Credits######################################################
# Coded by: Humberto Arocha humberto@openerp.com.ve
# Angelica Barrios angelicaisabelb@gmail.com
@ -28,6 +27,7 @@
"version": "2.0",
"author": "Vauxoo,Odoo Community Association (OCA)",
"website": "http://www.vauxoo.com",
"license": "AGPL-3",
"depends": ["base",
"account"
],

3
account_financial_report/model/__init__.py

@ -1,5 +1,4 @@
#!/usr/bin/python
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).

2
account_financial_report/model/account_financial_report.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).

3
account_financial_report/model/res_company.py

@ -1,5 +1,4 @@
#!/usr/bin/python
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).

2
account_financial_report/report/__init__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).

63
account_financial_report/report/parser.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
@ -164,19 +164,19 @@ class account_balance(report_sxw.rml_parse):
return False
def exchange_name(self, form):
self.from_currency_id = self.\
get_company_currency(form['company_id']
and type(form['company_id']) in (list, tuple)
and form['company_id'][0]
or form['company_id'])
self.from_currency_id = self.get_company_currency(
form['company_id'] and
type(form['company_id']) in (list, tuple) and
form['company_id'][0] or form['company_id'])
if not form['currency_id']:
self.to_currency_id = self.from_currency_id
else:
self.to_currency_id = form['currency_id'] \
and type(form['currency_id']) in (list, tuple) \
and form['currency_id'][0] or form['currency_id']
return self.pool.get('res.currency').browse(self.cr, self.uid,
self.to_currency_id).name
self.to_currency_id = (
form['currency_id'] and
type(form['currency_id']) in (list, tuple) and
form['currency_id'][0] or form['currency_id'])
return self.pool.get('res.currency').browse(
self.cr, self.uid, self.to_currency_id).name
def exchange(self, from_amount):
if self.from_currency_id == self.to_currency_id:
@ -548,10 +548,10 @@ class account_balance(report_sxw.rml_parse):
self.context['state'] = form['target_move'] or 'posted'
self.from_currency_id = self.\
get_company_currency(form['company_id']
and type(form['company_id']) in (list, tuple)
and form['company_id'][0]
or form['company_id'])
get_company_currency(form['company_id'] and
type(form['company_id']) in (list, tuple) and
form['company_id'][0] or
form['company_id'])
if not form['currency_id']:
self.to_currency_id = self.from_currency_id
else:
@ -566,16 +566,16 @@ class account_balance(report_sxw.rml_parse):
del form['account_list']
credit_account_ids = self.\
get_company_accounts(form['company_id']
and type(form['company_id']) in (list, tuple)
and form['company_id'][0]
or form['company_id'], 'credit')
get_company_accounts(form['company_id'] and
type(form['company_id']) in (list, tuple) and
form['company_id'][0] or
form['company_id'], 'credit')
debit_account_ids = self.\
get_company_accounts(form['company_id']
and type(form['company_id']) in (list, tuple)
and form['company_id'][0]
or form['company_id'], 'debit')
get_company_accounts(form['company_id'] and
type(form['company_id']) in (list, tuple) and
form['company_id'][0] or
form['company_id'], 'debit')
if form.get('fiscalyear'):
if type(form.get('fiscalyear')) in (list, tuple):
@ -592,9 +592,9 @@ class account_balance(report_sxw.rml_parse):
account_ids = _get_children_and_consol(
self.cr, self.uid, account_ids,
form['display_account_level']
and form['display_account_level']
or 100, self.context)
form['display_account_level'] and
form['display_account_level'] or
100, self.context)
credit_account_ids = _get_children_and_consol(
self.cr, self.uid, credit_account_ids, 100, self.context,
@ -850,15 +850,16 @@ class account_balance(report_sxw.rml_parse):
'id': id,
'type': aa_id[3].type,
'code': aa_id[3].code,
'name': (aa_id[2] and not aa_id[1])
and 'TOTAL %s' % (aa_id[3].name.upper())
or aa_id[3].name,
'name': ((aa_id[2] and not aa_id[1]) and
'TOTAL %s' % (aa_id[3].name.upper()) or
aa_id[3].name),
'parent_id': aa_id[3].parent_id and aa_id[3].parent_id.id,
'level': aa_id[3].level,
'label': aa_id[1],
'total': aa_id[2],
'change_sign': credit_account_ids
and (id in credit_account_ids and -1 or 1) or 1
'change_sign': (
credit_account_ids and
(id in credit_account_ids and -1 or 1) or 1),
}
if form['columns'] == 'qtr':

49
account_financial_report/wizard/wizard.py

@ -1,8 +1,7 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
# All Rights Reserved
# Credits######################################################
# Coded by: Humberto Arocha humberto@openerp.com.ve
# Angelica Barrios angelicaisabelb@gmail.com
@ -207,30 +206,22 @@ class wizard_report(osv.osv_memory):
if not afr_id:
return res
afr_brw = self.pool.get('afr').browse(cr, uid, afr_id, context=context)
res['value'].update({
'currency_id': afr_brw.currency_id
and afr_brw.currency_id.id
or afr_brw.company_id.currency_id.id})
res['value'].update({'inf_type': afr_brw.inf_type or 'BS'})
res['value'].update({'columns': afr_brw.columns or 'five'})
res['value'].update({
'display_account': afr_brw.display_account
or 'bal_mov'})
res['value'].update({
'display_account_level': afr_brw.
display_account_level or 0})
res['value'].update({
'fiscalyear': afr_brw.fiscalyear_id
and afr_brw.fiscalyear_id.id})
res['value'].update({'account_list': [
acc.id for acc in afr_brw.account_ids]})
res['value'].update({'periods': [p.id for p in afr_brw.period_ids]})
res['value'].update({
'analytic_ledger':
afr_brw.analytic_ledger or False})
res['value'].update({'tot_check': afr_brw.tot_check or False})
res['value'].update({'lab_str': afr_brw.lab_str or _(
'Write a Description for your Summary Total')})
res['value']['currency_id'] = (
afr_brw.currency_id and afr_brw.currency_id.id or
afr_brw.company_id.currency_id.id)
res['value']['inf_type'] = afr_brw.inf_type or 'BS'
res['value']['columns'] = afr_brw.columns or 'five'
res['value']['display_account'] = afr_brw.display_account or 'bal_mov'
res['value']['display_account_level'] = (
afr_brw.display_account_level or 0)
res['value']['fiscalyear'] = (
afr_brw.fiscalyear_id and afr_brw.fiscalyear_id.id)
res['value']['account_list'] = [acc.id for acc in afr_brw.account_ids]
res['value']['periods'] = [p.id for p in afr_brw.period_ids]
res['value']['analytic_ledger'] = afr_brw.analytic_ledger or False
res['value']['tot_check'] = afr_brw.tot_check or False
res['value']['lab_str'] = afr_brw.lab_str or _(
'Write a Description for your Summary Total')
return res
def _get_defaults(self, cr, uid, data, context=None):
@ -270,8 +261,8 @@ class wizard_report(osv.osv_memory):
res = cr.dictfetchall()
if res:
if (data['form']['date_to'] > res[0]['date_stop']
or data['form']['date_from'] < res[0]['date_start']):
if (data['form']['date_to'] > res[0]['date_stop'] or
data['form']['date_from'] < res[0]['date_start']):
raise osv.except_osv(_('UserError'),
'Las fechas deben estar entre %s y %s'
% (res[0]['date_start'],
@ -369,5 +360,3 @@ class wizard_report(osv.osv_memory):
return {'type': 'ir.actions.report.xml',
'report_name': name,
'datas': data}
wizard_report()

1
account_financial_report_horizontal/__openerp__.py

@ -33,6 +33,7 @@ This is a port to OpenERP 7.0 of the horizontal financial reports
'website': 'https://launchpad.net/account-financial-report',
'images': [],
"depends": ["account"],
"license": "AGPL-3",
'data': [
'menu.xml',
'account_report.xml',

6
account_financial_report_horizontal/report/account_balance_sheet.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
@ -161,8 +161,8 @@ class report_balancesheet_horizontal(
'type': account.type,
}
currency = (
account.currency_id and account.currency_id
or account.company_id.currency_id
account.currency_id and account.currency_id or
account.company_id.currency_id
)
if typ == 'liability' and account.type != 'view' and (
account.debit != account.credit

5
account_financial_report_horizontal/report/account_profit_loss.py

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
@ -135,8 +136,8 @@ class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):
account.user_type.report_type == typ
):
currency = (
account.currency_id and account.currency_id
or account.company_id.currency_id)
account.currency_id and account.currency_id or
account.company_id.currency_id)
if typ == 'expense' and account.type != 'view' and (
account.debit != account.credit
):

2
account_financial_report_webkit/__init__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi. Copyright Camptocamp SA

2
account_financial_report_webkit/__openerp__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Authors: Nicolas Bessi, Guewen Baconnier

2
account_financial_report_webkit/account_move_line.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi.

10
account_financial_report_webkit/report/aged_partner_balance.py

@ -309,10 +309,12 @@ class AccountAgedTrialBalanceWebkit(PartnersOpenInvoicesWebkit):
:returns: delta in days
"""
sale_lines = [x for x in ledger_lines if x['jtype'] in REC_PAY_TYPE
and line['rec_id'] == x['rec_id']]
refund_lines = [x for x in ledger_lines if x['jtype'] in REFUND_TYPE
and line['rec_id'] == x['rec_id']]
sale_lines = [
x for x in ledger_lines if x['jtype'] in REC_PAY_TYPE and
line['rec_id'] == x['rec_id']]
refund_lines = [
x for x in ledger_lines if x['jtype'] in REFUND_TYPE and
line['rec_id'] == x['rec_id']]
if len(sale_lines) == 1:
reference_line = sale_lines[0]
elif len(refund_lines) == 1:

2
account_financial_report_webkit/report/common_balance_reports.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier

2
account_financial_report_webkit/report/common_partner_balance_reports.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier

2
account_financial_report_webkit/report/common_partner_reports.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi, Guewen Baconnier

6
account_financial_report_webkit/report/common_reports.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi, Guewen Baconnier
@ -131,8 +131,8 @@ class CommonReportHeaderWebkit(common_report_header):
sorted_accounts = []
# add all accounts with same parent
level_accounts = [account for account in accounts
if account['parent_id']
and account['parent_id'][0] == parent['id']]
if account['parent_id'] and
account['parent_id'][0] == parent['id']]
# add consolidation children of parent, as they are logically on
# the same level
if parent.get('child_consol_ids'):

2
account_financial_report_webkit/report/general_ledger.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi, Guewen Baconnier

6
account_financial_report_webkit/report/open_invoices.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi, Guewen Baconnier
@ -157,8 +157,8 @@ class PartnersOpenInvoicesWebkit(report_sxw.rml_parse,
non_null_init_balances = dict([
(ib, amounts) for ib, amounts
in account.init_balance.iteritems()
if amounts['init_balance']
or amounts['init_balance_currency']])
if amounts['init_balance'] or
amounts['init_balance_currency']])
init_bal_lines_pids = non_null_init_balances.keys()
account.partners_order = self._order_partners(

2
account_financial_report_webkit/report/partner_balance.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier

6
account_financial_report_webkit/report/partners_ledger.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi, Guewen Baconnier
@ -159,8 +159,8 @@ class PartnersLedgerWebkit(report_sxw.rml_parse,
non_null_init_balances = dict(
[(ib, amounts) for ib, amounts
in account.init_balance.iteritems()
if amounts['init_balance']
or amounts['init_balance_currency']])
if amounts['init_balance'] or
amounts['init_balance_currency']])
init_bal_lines_pids = non_null_init_balances.keys()
else:
account.init_balance = {}

2
account_financial_report_webkit/report/print_journal.py

@ -161,5 +161,3 @@ HeaderFooterTextWebKitParser(
'addons/account_financial_report_webkit/report/templates/\
account_report_print_journal.mako',
parser=PrintJournalWebkit)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

2
account_financial_report_webkit/report/trial_balance.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier

5
account_financial_report_webkit/report/webkit_parser_header_fix.py

@ -43,8 +43,6 @@ from openerp import tools
from openerp.addons.report_webkit import webkit_report
from openerp.addons.report_webkit.report_helper import WebKitHelper
_logger = logging.getLogger('financial.reports.webkit')
# Class used only as a workaround to bug:
# http://code.google.com/p/wkhtmltopdf/issues/detail?id=656
@ -79,6 +77,9 @@ from mako.template import Template
from mako.lookup import TemplateLookup
_logger = logging.getLogger('financial.reports.webkit')
def mako_template(text):
"""Build a Mako template.

2
account_financial_report_webkit/wizard/general_ledger_wizard.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi, Guewen Baconnier

2
account_financial_report_webkit/wizard/open_invoices_wizard.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier

2
account_financial_report_webkit/wizard/partner_balance_wizard.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier

2
account_financial_report_webkit/wizard/partners_ledger_wizard.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi, Guewen Baconnier

2
account_financial_report_webkit/wizard/trial_balance_wizard.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier

2
account_financial_report_webkit_xls/__init__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_financial_report_webkit_xls/__openerp__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_financial_report_webkit_xls/report/__init__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_financial_report_webkit_xls/report/general_ledger_xls.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

35
account_financial_report_webkit_xls/report/open_invoices_xls.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
@ -260,8 +260,8 @@ class open_invoices_xls(report_xls):
partner_name):
if regroupmode == "regroup":
c_specs = [('acc_title', self.nbr_columns, 0, 'text',
' - '.join([account.code, account.name, partner_name
or _('No partner')])), ]
' - '.join([account.code, account.name, partner_name or
_('No partner')])), ]
else:
c_specs = [
('acc_title', self.nbr_columns, 0, 'text', ' - '.
@ -332,10 +332,10 @@ class open_invoices_xls(report_xls):
else:
c_specs += [('datedue', 1, 0, 'text', None)]
c_specs += [
('debit', 1, 0, 'number', line.get('debit')
or 0.0, None, style_line_decimal),
('credit', 1, 0, 'number', line.get('credit')
or 0.0, None, style_line_decimal),
('debit', 1, 0, 'number', line.get('debit') or 0.0,
None, style_line_decimal),
('credit', 1, 0, 'number', line.get('credit') or 0.0,
None, style_line_decimal),
]
# determine the formula of the cumulated balance
@ -357,8 +357,9 @@ class open_invoices_xls(report_xls):
if _p.amount_currency(data):
if account.currency_id:
c_specs += [
('curramount', 1, 0, 'number', line.get('amount_currency')
or 0.0, None, style_line_decimal),
('curramount', 1, 0, 'number',
line.get('amount_currency') or 0.0, None,
style_line_decimal),
('currcode', 1, 0, 'text', line[
'currency_code'], None, style_line_right),
]
@ -428,18 +429,18 @@ class open_invoices_xls(report_xls):
else:
c_specs += [('datedue', 1, 0, 'text', None)]
c_specs += [
('debit', 1, 0, 'number', line.get('debit')
or 0.0, None, style_line_decimal),
('credit', 1, 0, 'number', line.get('credit')
or 0.0, None, style_line_decimal),
('debit', 1, 0, 'number', line.get('debit') or 0.0, None,
style_line_decimal),
('credit', 1, 0, 'number', line.get('credit') or 0.0, None,
style_line_decimal),
('cumul', 1, 0, 'number', None, cumul_balance, style_line_decimal),
]
if account.currency_id:
c_specs += [
('curramount', 1, 0, 'number', line.get('amount_currency')
or 0.0, None, style_line_decimal),
('currcode', 1, 0, 'text', line.get('currency_code')
or '', None, style_line_right),
('curramount', 1, 0, 'number', line.get('amount_currency') or
0.0, None, style_line_decimal),
('currcode', 1, 0, 'text', line.get('currency_code') or '',
None, style_line_right),
]
else:
c_specs += [

2
account_financial_report_webkit_xls/report/partner_ledger_xls.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

9
account_financial_report_webkit_xls/report/partners_balance_xls.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
@ -137,9 +137,10 @@ class partners_balance_xls(report_xls):
('c', 2, 0, 'text', _('Comparison') + str(index + 1) +
' (C' + str(index + 1) + ')')]
if params['comparison_filter'] == 'filter_date':
c_specs += [('f', 2, 0, 'text', _('Dates Filter') + ': ' +
_p.formatLang(params['start'], date=True) + ' - '
+ _p.formatLang(params['stop'], date=True))]
c_specs += [
('f', 2, 0, 'text', _('Dates Filter') + ': ' +
_p.formatLang(params['start'], date=True) + ' - ' +
_p.formatLang(params['stop'], date=True))]
elif params['comparison_filter'] == 'filter_period':
c_specs += [('f', 2, 0, 'text', _('Periods Filter') +
': ' + params['start'].name + ' - ' +

7
account_financial_report_webkit_xls/report/trial_balance_xls.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
@ -304,8 +304,9 @@ class trial_balance_xls(report_xls):
('diff', 1, 0, 'number', comp_account[
'diff'], None, cell_style_decimal),
('diff_percent', 1, 0, 'number', comp_account[
'percent_diff'] and comp_account['percent_diff']
or 0, None, cell_style_pct),
'percent_diff'] and
comp_account['percent_diff'] or 0,
None, cell_style_pct),
]
c_specs += [('type', 1, 0, 'text',

2
account_financial_report_webkit_xls/wizard/__init__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_financial_report_webkit_xls/wizard/general_ledger_wizard.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_financial_report_webkit_xls/wizard/open_invoices_wizard.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_financial_report_webkit_xls/wizard/partners_balance_wizard.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_financial_report_webkit_xls/wizard/partners_ledger_wizard.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_financial_report_webkit_xls/wizard/trial_balance_wizard.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_journal_report_xls/__init__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_journal_report_xls/__openerp__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_journal_report_xls/account_journal.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_journal_report_xls/report/__init__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

22
account_journal_report_xls/report/nov_account_journal.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
@ -166,8 +166,8 @@ class nov_journal_print(report_sxw.rml_parse):
"rc.symbol AS currency_symbol, "
"coalesce(ai.internal_number,'-') AS inv_number, "
"coalesce(abs.name,'-') AS st_number, "
"coalesce(av.number,'-') AS voucher_number "
+ select_extra +
"coalesce(av.number,'-') AS voucher_number " +
select_extra +
"FROM account_move_line l "
"INNER JOIN account_move am ON l.move_id = am.id "
"INNER JOIN account_account aa "
@ -192,11 +192,11 @@ class nov_journal_print(report_sxw.rml_parse):
"LEFT OUTER JOIN account_analytic_account ana "
"ON l.analytic_account_id = ana.id "
"LEFT OUTER JOIN res_currency rc "
"ON l.currency_id = rc.id "
+ join_extra +
"ON l.currency_id = rc.id " +
join_extra +
"WHERE l.period_id IN %s AND l.journal_id = %s "
"AND am.state IN %s "
+ where_extra +
"AND am.state IN %s " +
where_extra +
"ORDER BY " + self.sort_selection +
", move_date, move_id, acc_code",
(tuple(period_ids), journal_id,
@ -206,12 +206,12 @@ class nov_journal_print(report_sxw.rml_parse):
# add reference of corresponding origin document
if journal.type in ('sale', 'sale_refund', 'purchase',
'purchase_refund'):
[x.update({'docname': (_('Invoice') + ': ' + x['inv_number'])
or (_('Voucher') + ': ' + x['voucher_number']) or '-'})
[x.update({'docname': (_('Invoice') + ': ' + x['inv_number']) 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 '-'})
[x.update({'docname': (_('Statement') + ': ' + x['st_number']) or
(_('Voucher') + ': ' + x['voucher_number']) or '-'})
for x in lines]
else:
code_string = j_obj._report_xls_document_extra(

2
account_journal_report_xls/report/nov_account_journal_xls.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_journal_report_xls/wizard/__init__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_journal_report_xls/wizard/print_journal_wizard.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

2
account_partner_aged_statement_webkit/__init__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

6
account_partner_aged_statement_webkit/__openerp__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
###############################################################################
#
# OpenERP, Open Source Management Solution
@ -23,7 +23,8 @@
{
'name': 'Partner Aged Statement',
"version": "1.0",
'author': 'Savoir-faire Linux',
'author': 'Savoir-faire Linux, '
'Odoo Community Association (OCA)',
'website': 'http://www.savoirfairelinux.com',
'depends': [
'report_webkit',
@ -31,6 +32,7 @@
'mail',
'account',
],
'license': 'AGPL-3',
'category': 'Accounting',
'description': """
Print & Send Partner Aged Statement by email

2
account_partner_aged_statement_webkit/partner_aged_statement.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
###############################################################################
#
# OpenERP, Open Source Management Solution

2
account_partner_aged_statement_webkit/report/__init__.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution

4
account_partner_aged_statement_webkit/report/partner_aged_statement_report.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
###############################################################################
#
# OpenERP, Open Source Management Solution
@ -199,8 +199,6 @@ class PartnerAgedTrialReport(aged_trial_report):
line['date_original'] >= stop
) and line['type'] in ['in_invoice', 'out_invoice'])
]
print movelines
return movelines
def _lines_get_31_60(self, partner, company):

2
account_partner_aged_statement_webkit/report/supplier_aged_statement_report.py

@ -1,4 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
###############################################################################
#
# OpenERP, Open Source Management Solution

2
account_partner_aged_statement_webkit/tests/test_aged_statement.py

@ -1,4 +1,4 @@
# -*- coding:utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 Savoir-faire Linux. All Rights Reserved.

Loading…
Cancel
Save