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
1=== modified file 'board/wizard/board_menu_create.py'
2--- board/wizard/board_menu_create.py 2011-01-14 00:11:01 +0000
3+++ board/wizard/board_menu_create.py 2011-02-08 06:58:13 +0000
4@@ -70,7 +70,9 @@
5 })
6 obj_menu = self.pool.get('ir.ui.menu')
7 #start Loop
8- for data in self.read(cr, uid, ids):
9+ for data in self.read(cr, uid, ids, context=context):
10+ if isinstance(data['menu_parent_id'], tuple):
11+ data['menu_parent_id'] = data['menu_parent_id'][0]
12 obj_menu.create(cr, uid, {
13 'name': data.get('menu_name'),
14 'parent_id': data.get('menu_parent_id'),
15
16=== modified file 'stock/wizard/stock_move.py'
17--- stock/wizard/stock_move.py 2011-02-01 21:08:39 +0000
18+++ stock/wizard/stock_move.py 2011-02-08 06:58:13 +0000
19@@ -43,7 +43,7 @@
20 @param context: A standard dictionary
21 @return:
22 """
23- datas = self.read(cr, uid, ids)[0]
24+ datas = self.read(cr, uid, ids, context=context)[0]
25 move_obj = self.pool.get('stock.move')
26 move_obj._track_lines(cr, uid, context['active_id'], datas, context=context)
27 return {'type': 'ir.actions.act_window_close'}
28
29=== modified file 'stock/wizard/stock_split_move.py'
30--- stock/wizard/stock_split_move.py 2011-01-14 00:11:01 +0000
31+++ stock/wizard/stock_split_move.py 2011-02-08 06:58:13 +0000
32@@ -107,7 +107,7 @@
33 record_id = context and context.get('active_id', False) or False
34 pick_obj = self.pool.get('stock.picking')
35 pick = pick_obj.browse(cr, uid, record_id, context=context)
36- data = self.read(cr, uid, ids[0])
37+ data = self.read(cr, uid, ids[0], context=context)
38 for move in pick.move_lines:
39 quantity = data['move%s' % move.id]
40 if 0 < quantity < move.product_qty:
41
42=== modified file 'survey/wizard/survey_browse_answer.py'
43--- survey/wizard/survey_browse_answer.py 2011-01-14 00:11:01 +0000
44+++ survey/wizard/survey_browse_answer.py 2011-02-08 06:58:13 +0000
45@@ -61,9 +61,11 @@
46 @return : Dictionary value for Open the browse answer wizard.
47 """
48 if context is None: context = {}
49- record = self.read(cr, uid, ids, [])
50+ record = self.read(cr, uid, ids, [],context=context)
51 record = record and record[0] or {}
52 if record['response_id']:
53+ if isinstance(record['response_id'], tuple):
54+ record['response_id'] = record['response_id'][0]
55 res_id = [(record['response_id'])]
56 else:
57 sur_response_obj = self.pool.get('survey.response')
58
59=== modified file 'survey/wizard/survey_print.py'
60--- survey/wizard/survey_print.py 2011-01-14 00:11:01 +0000
61+++ survey/wizard/survey_print.py 2011-02-08 06:58:13 +0000
62@@ -56,9 +56,9 @@
63 @return : Dictionary value for print survey form.
64 """
65
66- datas = {'ids' : self.read(cr, uid, ids, [], context)[0]['survey_ids']}
67+ datas = {'ids' : self.read(cr, uid, ids, [], context=context)[0]['survey_ids']}
68 res = self.read(cr, uid, ids, ['survey_title', 'orientation', 'paper_size',\
69- 'page_number', 'without_pagebreak'], context)
70+ 'page_number', 'without_pagebreak'], context=context)
71 res = res and res[0] or {}
72 datas['form'] = res
73 datas['model'] = 'survey.print'
74
75=== modified file 'survey/wizard/survey_print_answer.py'
76--- survey/wizard/survey_print_answer.py 2011-01-14 00:11:01 +0000
77+++ survey/wizard/survey_print_answer.py 2011-02-08 06:58:13 +0000
78@@ -59,7 +59,7 @@
79 context = {}
80 datas = {'ids': context.get('active_ids', [])}
81 res = self.read(cr, uid, ids, ['response_ids', 'orientation', 'paper_size',\
82- 'page_number', 'without_pagebreak'], context)
83+ 'page_number', 'without_pagebreak'], context=context)
84 res = res and res[0] or {}
85 datas['form'] = res
86 datas['model'] = 'survey.print.answer'
87
88=== modified file 'survey/wizard/survey_print_statistics.py'
89--- survey/wizard/survey_print_statistics.py 2011-01-14 00:11:01 +0000
90+++ survey/wizard/survey_print_statistics.py 2011-02-08 06:58:13 +0000
91@@ -44,7 +44,7 @@
92 if context is None:
93 context = {}
94 datas = {'ids': context.get('active_ids', [])}
95- res = self.read(cr, uid, ids, ['survey_ids'], context)
96+ res = self.read(cr, uid, ids, ['survey_ids'], context=context)
97 res = res and res[0] or {}
98 datas['form'] = res
99 datas['model'] = 'survey.print.statistics'
100
101=== modified file 'survey/wizard/survey_selection.py'
102--- survey/wizard/survey_selection.py 2011-01-14 00:11:01 +0000
103+++ survey/wizard/survey_selection.py 2011-02-08 06:58:13 +0000
104@@ -122,7 +122,7 @@
105 search_obj = self.pool.get('ir.ui.view')
106 if context is None: context = {}
107
108- sur_id = self.read(cr, uid, ids, [])[0]
109+ sur_id = self.read(cr, uid, ids, [], context=context)[0]
110 survey_id = sur_id['survey_id']
111 context.update({'survey_id': survey_id, 'sur_name_id': sur_id['id']})
112 cr.execute('select count(id) from survey_history where user_id=%s\
113@@ -133,7 +133,7 @@
114 if user_limit and res >= user_limit:
115 raise osv.except_osv(_('Warning !'),_("You can not give response for this survey more than %s times") % (user_limit))
116
117- sur_rec = survey_obj.read(cr,uid,self.read(cr,uid,ids)[0]['survey_id'])
118+ sur_rec = survey_obj.read(cr,uid,self.read(cr,uid,ids, context=context)[0]['survey_id'])
119 if sur_rec['max_response_limit'] and sur_rec['max_response_limit'] <= sur_rec['tot_start_survey']:
120 raise osv.except_osv(_('Warning !'),_("You can not give more response. Please contact the author of this survey for further assistance."))
121
122
123=== modified file 'survey/wizard/survey_send_invitation.py'
124--- survey/wizard/survey_send_invitation.py 2011-01-14 00:11:01 +0000
125+++ survey/wizard/survey_send_invitation.py 2011-02-08 06:58:13 +0000
126@@ -97,7 +97,7 @@
127 if context is None:
128 context = {}
129 record = self.read(cr, uid, ids, [])
130- survey_ids = context.get('active_ids', [])
131+ survey_ids = context.get('active_ids', [], context=context)
132 record = record and record[0]
133 partner_ids = record['partner_ids']
134 user_ref= self.pool.get('res.users')

Subscribers

People subscribed via source and target branches