[FIX] Account : Added web-client compatibility for field journal_ids on wizard
authorJay (OpenERP) <jvo@tinyerp.com>
Wed, 6 Oct 2010 14:21:59 +0000 (19:51 +0530)
committerJay (OpenERP) <jvo@tinyerp.com>
Wed, 6 Oct 2010 14:21:59 +0000 (19:51 +0530)
bzr revid: jvo@tinyerp.com-20101006142159-e8ce0vjrph07b2xr

addons/account/wizard/wizard_statement_from_invoice.py

index 3946069..dfbf9f1 100644 (file)
@@ -41,14 +41,14 @@ FIELDS = {
 
 START_FIELD = {
     'date': {'string': 'Date payment', 'type': 'date','required':True, 'default': lambda *a: time.strftime('%Y-%m-%d')},
-    'journal_id': {'string': 'Journal', 'type': 'many2many', 'relation': 'account.journal', 'domain': '[("type","in",["sale","purchase","cash"])]', 'help': 'This field allow you to choose the accounting journals you want for filtering the invoices. If you left this field empty, it will search on all sale, purchase and cash journals.'},
+    'journal_ids': {'string': 'Journal', 'type': 'many2many', 'relation': 'account.journal', 'domain': '[("type","in",["sale","purchase","cash"])]', 'help': 'This field allow you to choose the accounting journals you want for filtering the invoices. If you left this field empty, it will search on all sale, purchase and cash journals.'},
 }
 
 START_FORM = '''<?xml version="1.0"?>
 <form string="Import Invoices in Statement">
     <label string="Choose Journal and Payment Date" colspan="4"/>
     <field name="date"/>
-    <field name="journal_id" colspan="4"/>
+    <field name="journal_ids" colspan="4"/>
 </form>'''
 
 def _search_invoices(obj, cr, uid, data, context):
@@ -73,7 +73,7 @@ def _search_invoices(obj, cr, uid, data, context):
         if move_line_id:
             repeated_move_line_ids += move_line_id
         
-    journal_ids = data['form']['journal_id'][0][2]
+    journal_ids = data['form']['journal_ids'][0][2]
 
     if journal_ids == []:
         journal_ids = journal_obj.search(cr, uid, [('type', 'in', ('sale','cash','purchase'))], context=context)