[MERGE] lp:735965

bzr revid: qdp-launchpad@openerp.com-20110316100522-ad2mqfcc8x14kt79
This commit is contained in:
Quentin (OpenERP)
2011-03-16 11:05:22 +01:00
+2 -2
View File
@@ -213,7 +213,7 @@ class account_installer(osv.osv_memory):
}, context=context)
if 'date_start' in res and 'date_stop' in res:
f_ids = fy_obj.search(cr, uid, [('date_start', '<=', res['date_start']), ('date_stop', '>=', res['date_stop']), ('company_id', '=', res['company_id'])], context=context)
f_ids = fy_obj.search(cr, uid, [('date_start', '<=', res['date_start']), ('date_stop', '>=', res['date_stop']), ('company_id', '=', res['company_id'][0])], context=context)
if not f_ids:
name = code = res['date_start'][:4]
if int(name) != int(res['date_stop'][:4]):
@@ -224,7 +224,7 @@ class account_installer(osv.osv_memory):
'code': code,
'date_start': res['date_start'],
'date_stop': res['date_stop'],
'company_id': res['company_id']
'company_id': res['company_id'][0]
}
fiscal_id = fy_obj.create(cr, uid, vals, context=context)
if res['period'] == 'month':