[IMP] account: removed default value for fiscalyear in chart of account (doesn't work for multicompany)
bzr revid: qdp-launchpad@tinyerp.com-20101018203238-p1s1z6zda3g09274
This commit is contained in:
@@ -38,13 +38,6 @@ class account_chart(osv.osv_memory):
|
||||
('posted', 'All Posted Entries')], 'Target Moves', required = True),
|
||||
}
|
||||
|
||||
def _get_fiscalyear(self, cr, uid, context=None):
|
||||
"""Return default Fiscalyear value"""
|
||||
fy_obj = self.pool.get('account.fiscalyear')
|
||||
now = time.strftime('%Y-%m-%d')
|
||||
fiscalyears = fy_obj.search(cr, uid, [('date_start', '<', now), ('date_stop', '>', now)], limit=1 )
|
||||
return fiscalyears and fiscalyears[0] or False
|
||||
|
||||
def onchange_fiscalyear(self, cr, uid, ids, fiscalyear_id=False, context=None):
|
||||
res = {}
|
||||
res['value'] = {}
|
||||
@@ -100,10 +93,9 @@ class account_chart(osv.osv_memory):
|
||||
return result
|
||||
|
||||
_defaults = {
|
||||
'fiscalyear': _get_fiscalyear,
|
||||
'target_move': 'all'
|
||||
}
|
||||
|
||||
account_chart()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
Reference in New Issue
Block a user