openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #00383
[Merge] lp:~openerp-community/openobject-addons/6.0_bug_801562 into lp:openobject-addons/6.0
Leonardo Pistone - Agile BG - Domsense has proposed merging lp:~openerp-community/openobject-addons/6.0_bug_801562 into lp:openobject-addons/6.0.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #801562 in OpenERP Addons: "Partner ledger doesn't show partner names with multi-company"
https://bugs.launchpad.net/openobject-addons/+bug/801562
For more details, see:
https://code.launchpad.net/~openerp-community/openobject-addons/6.0_bug_801562/+merge/65792
That _should_ make the partner ledge word on multi-company scenarios.
--
https://code.launchpad.net/~openerp-community/openobject-addons/6.0_bug_801562/+merge/65792
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openobject-addons/6.0_bug_801562.
=== modified file 'account/report/account_partner_ledger.py'
--- account/report/account_partner_ledger.py 2011-01-14 00:11:01 +0000
+++ account/report/account_partner_ledger.py 2011-06-24 13:52:35 +0000
@@ -56,6 +56,7 @@
def set_context(self, objects, data, ids, report_type=None):
obj_move = self.pool.get('account.move.line')
obj_partner = self.pool.get('res.partner')
+ current_company = self.pool.get('res.users').browse(self.cr, self.uid, self.uid).company_id.id
self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {}))
ctx2 = data['form'].get('used_context',{}).copy()
ctx2.update({'initial_bal': True})
@@ -101,8 +102,9 @@
# "AND " + self.query +" " \
"AND l.account_id IN %s " \
" " + PARTNER_REQUEST + " " \
+ "AND l.company_id = %s " \
"AND account.active ",
- (tuple(move_state), tuple(self.account_ids),))
+ (tuple(move_state), tuple(self.account_ids), current_company))
res = self.cr.dictfetchall()
for res_line in res:
Follow ups