c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #33639
[Bug 863221] [NEW] [6.0] ir_sequence does'nt work with multi_company
Public bug reported:
On ~openerp/openobject-server/6.0 since rev 3460:
"rev 3460 : [MERGE] Merged ILA's branch for the fix of correction in
get_id() of ir_sequence to allow multi-company feature"
It's does'nt work if you use multi-company feature...
Now the sql query select every sequences for all companies (for the
object) order by company_id, but there is a cr.dictfetchone() after sql
response...
For example, when you create a sale_order (or any other objects), the sequence returned is the for the first company_id found.
However we need to have the specific sequence of the active user's company .
So the code of ir_sequence.py before rev 3460 works fine with multi-
company
ir_sequence.py, line 78 rev 3460:
- company_id = self.pool.get('res.users').read(cr, uid, uid, ['company_id'], context=context)['company_id'][0] or None
+ company_ids = self.pool.get('res.company').search(cr, uid, [], context=context)
** Affects: openobject-server
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/863221
Title:
[6.0] ir_sequence does'nt work with multi_company
Status in OpenERP Server:
New
Bug description:
On ~openerp/openobject-server/6.0 since rev 3460:
"rev 3460 : [MERGE] Merged ILA's branch for the fix of correction in
get_id() of ir_sequence to allow multi-company feature"
It's does'nt work if you use multi-company feature...
Now the sql query select every sequences for all companies (for the
object) order by company_id, but there is a cr.dictfetchone() after
sql response...
For example, when you create a sale_order (or any other objects), the sequence returned is the for the first company_id found.
However we need to have the specific sequence of the active user's company .
So the code of ir_sequence.py before rev 3460 works fine with multi-
company
ir_sequence.py, line 78 rev 3460:
- company_id = self.pool.get('res.users').read(cr, uid, uid, ['company_id'], context=context)['company_id'][0] or None
+ company_ids = self.pool.get('res.company').search(cr, uid, [], context=context)
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/863221/+subscriptions
Follow ups
-
[Bug 863221] Re: sequence might use a child company's sequence by error under certain circumstances
From: Olivier Dony (OpenERP), 2011-11-14
-
[Bug 863221] Re: sequence might use a child company's sequence by error under certain circumstances
From: Naresh(OpenERP), 2011-11-14
-
[Bug 863221] Re: sequence might use a child company's sequence by error under certain circumstances
From: Launchpad Bug Tracker, 2011-11-14
-
[Bug 863221] Re: sequence might use a child company's sequence by error under certain circumstances
From: Naresh(OpenERP), 2011-11-14
-
[Bug 863221] Re: sequence might use a child company's sequence by error under certain circumstances
From: Amit Parik (OpenERP), 2011-10-17
-
[Bug 863221] Re: sequence might use a child company's sequence by error under certain circumstances
From: Amit Parik (OpenERP), 2011-10-17
-
[Bug 863221] Re: [6.0] ir_sequence does'nt work with multi_company
From: Pollet Alexandre, 2011-10-05
-
[Bug 863221] Re: [6.0] ir_sequence does'nt work with multi_company
From: Amit Parik (OpenERP), 2011-10-05
-
[Bug 863221] Re: [6.0] ir_sequence does'nt work with multi_company
From: Amit Parik (OpenERP), 2011-10-05
-
[Bug 863221] [NEW] [6.0] ir_sequence does'nt work with multi_company
From: Pollet Alexandre, 2011-09-30
References