mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] minor cleanup
This commit is contained in:
@@ -38,19 +38,19 @@ class account_tax_declaration_analysis(orm.TransientModel):
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
action_obj = self.pool.get('ir.actions.act_window')
|
||||
domain = []
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
data = self.read(cr, uid, ids, [], context=context)[0]
|
||||
period_list = data['period_list']
|
||||
if period_list:
|
||||
domain = [('period_id', 'in', period_list)]
|
||||
else:
|
||||
raise osv.except_osv(_('No period defined'), _("You must selected period "))
|
||||
##
|
||||
raise osv.except_osv(_('No period defined'),
|
||||
_("You must selected period "))
|
||||
actions = mod_obj.get_object_reference(cr, uid,
|
||||
'account_tax_analysis', 'action_view_tax_analysis')
|
||||
id_action = actions and actions[1] or False
|
||||
'account_tax_analysis',
|
||||
'action_view_tax_analysis')
|
||||
id_action = actions[1] if actions else False
|
||||
action_mod = action_obj.read(cr, uid, id_action)
|
||||
action_mod['domain'] = domain
|
||||
|
||||
return action_mod
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
Reference in New Issue
Block a user