Merge lp:~openerp-commiter/openobject-addons/trunk-addons-aag into lp:~openerp/openobject-addons/trunk-fix-osvmem-read

Proposed by Atik Agewan(OpenERP)
Status: Merged
Merged at revision: 4402
Proposed branch: lp:~openerp-commiter/openobject-addons/trunk-addons-aag
Merge into: lp:~openerp/openobject-addons/trunk-fix-osvmem-read
Diff against target: 134 lines (+15/-11)
9 files modified
board/wizard/board_menu_create.py (+3/-1)
stock/wizard/stock_move.py (+1/-1)
stock/wizard/stock_split_move.py (+1/-1)
survey/wizard/survey_browse_answer.py (+3/-1)
survey/wizard/survey_print.py (+2/-2)
survey/wizard/survey_print_answer.py (+1/-1)
survey/wizard/survey_print_statistics.py (+1/-1)
survey/wizard/survey_selection.py (+2/-2)
survey/wizard/survey_send_invitation.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-commiter/openobject-addons/trunk-addons-aag
Reviewer Review Type Date Requested Status
Atik Agewan(OpenERP) (community) Needs Resubmitting
Rucha (Open ERP) (community) Needs Fixing
Review via email: mp+48876@code.launchpad.net

Description of the change

Improvement in Read method in Osv memory wizard

To post a comment you must log in.
Revision history for this message
Rucha (Open ERP) (rpa-openerp) :
review: Needs Fixing
Revision history for this message
Atik Agewan(OpenERP) (aag-openerp) wrote :

improvement in use isinstance in osv wiz

review: Needs Resubmitting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'board/wizard/board_menu_create.py'
--- board/wizard/board_menu_create.py 2011-01-14 00:11:01 +0000
+++ board/wizard/board_menu_create.py 2011-02-08 06:58:13 +0000
@@ -70,7 +70,9 @@
70 })70 })
71 obj_menu = self.pool.get('ir.ui.menu')71 obj_menu = self.pool.get('ir.ui.menu')
72 #start Loop72 #start Loop
73 for data in self.read(cr, uid, ids):73 for data in self.read(cr, uid, ids, context=context):
74 if isinstance(data['menu_parent_id'], tuple):
75 data['menu_parent_id'] = data['menu_parent_id'][0]
74 obj_menu.create(cr, uid, {76 obj_menu.create(cr, uid, {
75 'name': data.get('menu_name'),77 'name': data.get('menu_name'),
76 'parent_id': data.get('menu_parent_id'),78 'parent_id': data.get('menu_parent_id'),
7779
=== modified file 'stock/wizard/stock_move.py'
--- stock/wizard/stock_move.py 2011-02-01 21:08:39 +0000
+++ stock/wizard/stock_move.py 2011-02-08 06:58:13 +0000
@@ -43,7 +43,7 @@
43 @param context: A standard dictionary43 @param context: A standard dictionary
44 @return:44 @return:
45 """45 """
46 datas = self.read(cr, uid, ids)[0]46 datas = self.read(cr, uid, ids, context=context)[0]
47 move_obj = self.pool.get('stock.move')47 move_obj = self.pool.get('stock.move')
48 move_obj._track_lines(cr, uid, context['active_id'], datas, context=context)48 move_obj._track_lines(cr, uid, context['active_id'], datas, context=context)
49 return {'type': 'ir.actions.act_window_close'}49 return {'type': 'ir.actions.act_window_close'}
5050
=== modified file 'stock/wizard/stock_split_move.py'
--- stock/wizard/stock_split_move.py 2011-01-14 00:11:01 +0000
+++ stock/wizard/stock_split_move.py 2011-02-08 06:58:13 +0000
@@ -107,7 +107,7 @@
107 record_id = context and context.get('active_id', False) or False107 record_id = context and context.get('active_id', False) or False
108 pick_obj = self.pool.get('stock.picking')108 pick_obj = self.pool.get('stock.picking')
109 pick = pick_obj.browse(cr, uid, record_id, context=context)109 pick = pick_obj.browse(cr, uid, record_id, context=context)
110 data = self.read(cr, uid, ids[0])110 data = self.read(cr, uid, ids[0], context=context)
111 for move in pick.move_lines:111 for move in pick.move_lines:
112 quantity = data['move%s' % move.id]112 quantity = data['move%s' % move.id]
113 if 0 < quantity < move.product_qty:113 if 0 < quantity < move.product_qty:
114114
=== modified file 'survey/wizard/survey_browse_answer.py'
--- survey/wizard/survey_browse_answer.py 2011-01-14 00:11:01 +0000
+++ survey/wizard/survey_browse_answer.py 2011-02-08 06:58:13 +0000
@@ -61,9 +61,11 @@
61 @return : Dictionary value for Open the browse answer wizard.61 @return : Dictionary value for Open the browse answer wizard.
62 """62 """
63 if context is None: context = {}63 if context is None: context = {}
64 record = self.read(cr, uid, ids, [])64 record = self.read(cr, uid, ids, [],context=context)
65 record = record and record[0] or {} 65 record = record and record[0] or {}
66 if record['response_id']:66 if record['response_id']:
67 if isinstance(record['response_id'], tuple):
68 record['response_id'] = record['response_id'][0]
67 res_id = [(record['response_id'])]69 res_id = [(record['response_id'])]
68 else:70 else:
69 sur_response_obj = self.pool.get('survey.response')71 sur_response_obj = self.pool.get('survey.response')
7072
=== modified file 'survey/wizard/survey_print.py'
--- survey/wizard/survey_print.py 2011-01-14 00:11:01 +0000
+++ survey/wizard/survey_print.py 2011-02-08 06:58:13 +0000
@@ -56,9 +56,9 @@
56 @return : Dictionary value for print survey form.56 @return : Dictionary value for print survey form.
57 """57 """
5858
59 datas = {'ids' : self.read(cr, uid, ids, [], context)[0]['survey_ids']}59 datas = {'ids' : self.read(cr, uid, ids, [], context=context)[0]['survey_ids']}
60 res = self.read(cr, uid, ids, ['survey_title', 'orientation', 'paper_size',\60 res = self.read(cr, uid, ids, ['survey_title', 'orientation', 'paper_size',\
61 'page_number', 'without_pagebreak'], context)61 'page_number', 'without_pagebreak'], context=context)
62 res = res and res[0] or {}62 res = res and res[0] or {}
63 datas['form'] = res63 datas['form'] = res
64 datas['model'] = 'survey.print'64 datas['model'] = 'survey.print'
6565
=== modified file 'survey/wizard/survey_print_answer.py'
--- survey/wizard/survey_print_answer.py 2011-01-14 00:11:01 +0000
+++ survey/wizard/survey_print_answer.py 2011-02-08 06:58:13 +0000
@@ -59,7 +59,7 @@
59 context = {}59 context = {}
60 datas = {'ids': context.get('active_ids', [])}60 datas = {'ids': context.get('active_ids', [])}
61 res = self.read(cr, uid, ids, ['response_ids', 'orientation', 'paper_size',\61 res = self.read(cr, uid, ids, ['response_ids', 'orientation', 'paper_size',\
62 'page_number', 'without_pagebreak'], context)62 'page_number', 'without_pagebreak'], context=context)
63 res = res and res[0] or {}63 res = res and res[0] or {}
64 datas['form'] = res64 datas['form'] = res
65 datas['model'] = 'survey.print.answer'65 datas['model'] = 'survey.print.answer'
6666
=== modified file 'survey/wizard/survey_print_statistics.py'
--- survey/wizard/survey_print_statistics.py 2011-01-14 00:11:01 +0000
+++ survey/wizard/survey_print_statistics.py 2011-02-08 06:58:13 +0000
@@ -44,7 +44,7 @@
44 if context is None:44 if context is None:
45 context = {}45 context = {}
46 datas = {'ids': context.get('active_ids', [])}46 datas = {'ids': context.get('active_ids', [])}
47 res = self.read(cr, uid, ids, ['survey_ids'], context)47 res = self.read(cr, uid, ids, ['survey_ids'], context=context)
48 res = res and res[0] or {}48 res = res and res[0] or {}
49 datas['form'] = res49 datas['form'] = res
50 datas['model'] = 'survey.print.statistics'50 datas['model'] = 'survey.print.statistics'
5151
=== modified file 'survey/wizard/survey_selection.py'
--- survey/wizard/survey_selection.py 2011-01-14 00:11:01 +0000
+++ survey/wizard/survey_selection.py 2011-02-08 06:58:13 +0000
@@ -122,7 +122,7 @@
122 search_obj = self.pool.get('ir.ui.view')122 search_obj = self.pool.get('ir.ui.view')
123 if context is None: context = {}123 if context is None: context = {}
124124
125 sur_id = self.read(cr, uid, ids, [])[0]125 sur_id = self.read(cr, uid, ids, [], context=context)[0]
126 survey_id = sur_id['survey_id']126 survey_id = sur_id['survey_id']
127 context.update({'survey_id': survey_id, 'sur_name_id': sur_id['id']})127 context.update({'survey_id': survey_id, 'sur_name_id': sur_id['id']})
128 cr.execute('select count(id) from survey_history where user_id=%s\128 cr.execute('select count(id) from survey_history where user_id=%s\
@@ -133,7 +133,7 @@
133 if user_limit and res >= user_limit:133 if user_limit and res >= user_limit:
134 raise osv.except_osv(_('Warning !'),_("You can not give response for this survey more than %s times") % (user_limit))134 raise osv.except_osv(_('Warning !'),_("You can not give response for this survey more than %s times") % (user_limit))
135135
136 sur_rec = survey_obj.read(cr,uid,self.read(cr,uid,ids)[0]['survey_id'])136 sur_rec = survey_obj.read(cr,uid,self.read(cr,uid,ids, context=context)[0]['survey_id'])
137 if sur_rec['max_response_limit'] and sur_rec['max_response_limit'] <= sur_rec['tot_start_survey']:137 if sur_rec['max_response_limit'] and sur_rec['max_response_limit'] <= sur_rec['tot_start_survey']:
138 raise osv.except_osv(_('Warning !'),_("You can not give more response. Please contact the author of this survey for further assistance."))138 raise osv.except_osv(_('Warning !'),_("You can not give more response. Please contact the author of this survey for further assistance."))
139139
140140
=== modified file 'survey/wizard/survey_send_invitation.py'
--- survey/wizard/survey_send_invitation.py 2011-01-14 00:11:01 +0000
+++ survey/wizard/survey_send_invitation.py 2011-02-08 06:58:13 +0000
@@ -97,7 +97,7 @@
97 if context is None:97 if context is None:
98 context = {}98 context = {}
99 record = self.read(cr, uid, ids, [])99 record = self.read(cr, uid, ids, [])
100 survey_ids = context.get('active_ids', [])100 survey_ids = context.get('active_ids', [], context=context)
101 record = record and record[0]101 record = record and record[0]
102 partner_ids = record['partner_ids']102 partner_ids = record['partner_ids']
103 user_ref= self.pool.get('res.users')103 user_ref= self.pool.get('res.users')

Subscribers

People subscribed via source and target branches