Jagdish Panchal (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-834512-jap into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #834512 in OpenERP Addons: "Journal Item/Entry - wrong Counterpart 
Item/Entry"
  https://bugs.launchpad.net/openobject-addons/+bug/834512

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-834512-jap/+merge/85797

Hello,

Fixed key error of journal_id while creating journal items --fixes lp:834512

Thanks
JAP
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-834512-jap/+merge/85797
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-834512-jap.
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py	2011-11-14 11:34:05 +0000
+++ account/account_move_line.py	2011-12-15 06:34:26 +0000
@@ -1249,6 +1249,8 @@
             if len(period_candidate_ids) != 1:
                 raise osv.except_osv(_('Encoding error'), _('No period found or period given is ambigous.'))
             context['period_id'] = period_candidate_ids[0][0]
+        if not context.get('journal_id', False) and context.get('search_default_journal_id', False):
+            context['journal_id'] = context.get('search_default_journal_id')            
         self._update_journal_check(cr, uid, context['journal_id'], context['period_id'], context)
         move_id = vals.get('move_id', False)
         journal = journal_obj.browse(cr, uid, context['journal_id'], context=context)

_______________________________________________
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

Reply via email to