[PEP8]
parent
c1eed168a4
commit
114410091e
|
@ -3,7 +3,7 @@
|
|||
# Module Writen to OpenERP, Open Source Management Solution
|
||||
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
|
||||
# All Rights Reserved
|
||||
###############Credits######################################################
|
||||
# Credits######################################################
|
||||
# Coded by: Humberto Arocha humberto@openerp.com.ve
|
||||
# Angelica Barrios angelicaisabelb@gmail.com
|
||||
# Jordi Esteve <jesteve@zikzakmedia.com>
|
||||
|
@ -31,6 +31,7 @@ import pooler
|
|||
import time
|
||||
from tools.translate import _
|
||||
|
||||
|
||||
class account_financial_report(osv.osv):
|
||||
_name = "afr"
|
||||
|
||||
|
@ -75,7 +76,8 @@ class account_financial_report(osv.osv):
|
|||
context = {}
|
||||
previous_name = self.browse(cr, uid, id, context=context).name
|
||||
new_name = _('Copy of %s') % previous_name
|
||||
lst = self.search(cr, uid, [('name','like',new_name)], context=context)
|
||||
lst = self.search(cr, uid, [(
|
||||
'name', 'like', new_name)], context=context)
|
||||
if lst:
|
||||
new_name = '%s (%s)' % (new_name, len(lst)+1)
|
||||
defaults['name'] = new_name
|
||||
|
@ -101,7 +103,8 @@ class account_financial_report(osv.osv):
|
|||
|
||||
if columns in ('qtr', 'thirteen'):
|
||||
p_obj = self.pool.get("account.period")
|
||||
period_ids = p_obj.search(cr,uid,[('fiscalyear_id','=',fiscalyear_id),('special','=',False)],context=context)
|
||||
period_ids = p_obj.search(cr, uid, [('fiscalyear_id', '=', fiscalyear_id), (
|
||||
'special', '=', False)], context=context)
|
||||
res['value'].update({'period_ids': period_ids})
|
||||
else:
|
||||
res['value'].update({'period_ids': []})
|
||||
|
@ -112,7 +115,8 @@ class account_financial_report(osv.osv):
|
|||
context = {}
|
||||
context['company_id'] = company_id
|
||||
res = {'value': {}}
|
||||
cur_id = self.pool.get('res.company').browse(cr,uid,company_id,context=context).currency_id.id
|
||||
cur_id = self.pool.get('res.company').browse(
|
||||
cr, uid, company_id, context=context).currency_id.id
|
||||
res['value'].update({'currency_id': cur_id})
|
||||
return res
|
||||
|
||||
|
@ -125,8 +129,10 @@ class account_financial_report(osv.osv):
|
|||
if not company_id:
|
||||
return res
|
||||
|
||||
cur_id = self.pool.get('res.company').browse(cr,uid,company_id,context=context).currency_id.id
|
||||
fy_id = self.pool.get('account.fiscalyear').find(cr, uid,context=context)
|
||||
cur_id = self.pool.get('res.company').browse(
|
||||
cr, uid, company_id, context=context).currency_id.id
|
||||
fy_id = self.pool.get('account.fiscalyear').find(
|
||||
cr, uid, context=context)
|
||||
res['value'].update({'fiscalyear_id': fy_id})
|
||||
res['value'].update({'currency_id': cur_id})
|
||||
res['value'].update({'account_ids': []})
|
||||
|
|
Loading…
Reference in New Issue