[FIX] account : improved the dates in recurring entries
lp bug: https://launchpad.net/bugs/800767 fixed bzr revid: bde@tinyerp.com-20110719130740-eq87ant192zguo0n
This commit is contained in:
parent
e4b1ae8c1a
commit
c38c7d055c
|
@ -2120,7 +2120,7 @@ class account_model(osv.osv):
|
|||
period_id = period_id[0]
|
||||
|
||||
for model in self.browse(cr, uid, ids, context=context):
|
||||
entry['name'] = model.name%{'year':time.strftime('%Y'), 'month':time.strftime('%m'), 'date':time.strftime('%Y-%m')}
|
||||
entry['name'] = model.name%{'year':context.get('date',time.strftime('%Y')), 'month':context.get('date',time.strftime('%m')), 'date':context.get('date',time.strftime('%d'))}
|
||||
move_id = account_move_obj.create(cr, uid, {
|
||||
'ref': entry['name'],
|
||||
'period_id': period_id,
|
||||
|
@ -2141,7 +2141,7 @@ class account_model(osv.osv):
|
|||
'analytic_account_id': analytic_account_id
|
||||
}
|
||||
|
||||
date_maturity = time.strftime('%Y-%m-%d')
|
||||
date_maturity = context.get('date',time.strftime('%Y-%m-%d'))
|
||||
if line.date_maturity == 'partner':
|
||||
if not line.partner_id:
|
||||
raise osv.except_osv(_('Error !'), _("Maturity date of entry line generated by model line '%s' of model '%s' is based on partner payment term!" \
|
||||
|
|
Loading…
Reference in New Issue