Khushboo Bhatt(openerp) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-addons9-accounting-apa-customers-suppliers-journal-items-kbh
into lp:~openerp-dev/openobject-addons/trunk-addons9-accounting-apa.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons9-accounting-apa-customers-suppliers-journal-items-kbh/+merge/124189
Hello,
Account::
I have fixed the issue of customer/supplier journal items wizard.
Thank you,
KBH.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons9-accounting-apa-customers-suppliers-journal-items-kbh/+merge/124189
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openobject-addons/trunk-addons9-accounting-apa-customers-suppliers-journal-items-kbh
into lp:~openerp-dev/openobject-addons/trunk-addons9-accounting-apa.
=== modified file 'account/account.py'
--- account/account.py 2012-09-12 00:57:21 +0000
+++ account/account.py 2012-09-13 12:47:52 +0000
@@ -836,6 +836,10 @@
@return: Returns a list of tupples containing id, name
"""
+ if not ids:
+ return []
+ if isinstance(ids, (int, long)):
+ ids = [ids]
result = self.browse(cr, user, ids, context=context)
res = []
for rs in result:
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py 2012-08-07 11:34:14 +0000
+++ account/account_move_line.py 2012-09-13 12:47:52 +0000
@@ -926,12 +926,14 @@
return res
if (not context.get('journal_id', False)) or (not context.get('period_id', False)):
return False
- cr.execute('SELECT code FROM account_journal WHERE id = %s', (context['journal_id'], ))
- j = cr.fetchone()[0] or ''
- cr.execute('SELECT code FROM account_period WHERE id = %s', (context['period_id'], ))
- p = cr.fetchone()[0] or ''
- if j or p:
- return j + (p and (':' + p) or '')
+ if context.get('search_default_journal_id', False):
+ context['journal_id'] = context.get('search_default_journal_id')
+ cr.execute('SELECT code FROM account_journal WHERE id = %s', (context['journal_id'], ))
+ j = cr.fetchone()[0] or ''
+ cr.execute('SELECT code FROM account_period WHERE id = %s', (context['period_id'], ))
+ p = cr.fetchone()[0] or ''
+ if j or p:
+ return j + (p and (':' + p) or '')
return False
def onchange_date(self, cr, user, ids, date, context=None):
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp