[FIX]account: Default period and account in invoices line for multi-company doesn't work
lp bug: https://launchpad.net/bugs/702318 fixed bzr revid: ara@tinyerp.com-20110118115743-5jikie7bxbblpnjy
This commit is contained in:
parent
fae0bc21a2
commit
785281bb48
|
@ -910,7 +910,7 @@ class account_invoice(osv.osv):
|
|||
}
|
||||
period_id = inv.period_id and inv.period_id.id or False
|
||||
if not period_id:
|
||||
period_ids = self.pool.get('account.period').search(cr, uid, [('date_start','<=',inv.date_invoice or time.strftime('%Y-%m-%d')),('date_stop','>=',inv.date_invoice or time.strftime('%Y-%m-%d'))])
|
||||
period_ids = self.pool.get('account.period').search(cr, uid, [('date_start','<=',inv.date_invoice or time.strftime('%Y-%m-%d')),('date_stop','>=',inv.date_invoice or time.strftime('%Y-%m-%d')), ('company_id', '=', inv.company_id.id)])
|
||||
if period_ids:
|
||||
period_id = period_ids[0]
|
||||
if period_id:
|
||||
|
|
Loading…
Reference in New Issue