From 785281bb48620aaedddc4ca0b48a408b6c9ae062 Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Tue, 18 Jan 2011 17:27:43 +0530 Subject: [PATCH] [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 --- addons/account/invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 3298ef3c843..64634e34a96 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -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: