Merge lp:~unifield-team/unifield-web/us-1322 into lp:unifield-web

Proposed by jftempo
Status: Merged
Merged at revision: 4828
Proposed branch: lp:~unifield-team/unifield-web/us-1322
Merge into: lp:unifield-web
Diff against target: 16 lines (+4/-0)
1 file modified
addons/openerp/widgets/listgrid.py (+4/-0)
To merge this branch: bzr merge lp:~unifield-team/unifield-web/us-1322
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+314804@code.launchpad.net
To post a comment you must log in.
4829. By Quentin THEURET @Amaris

US-1322 [FIX] 'hide_new_button' feature didn't work on o2m after the last commit

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'addons/openerp/widgets/listgrid.py'
--- addons/openerp/widgets/listgrid.py 2016-09-08 12:22:46 +0000
+++ addons/openerp/widgets/listgrid.py 2017-01-16 15:37:42 +0000
@@ -130,8 +130,12 @@
130 self.hide_new_button = False130 self.hide_new_button = False
131 self.hide_delete_button = False131 self.hide_delete_button = False
132 self.hide_edit_button = False132 self.hide_edit_button = False
133 self.show_add_button = False
133 try:134 try:
134 self.hide_new_button = expr_eval(attrs.get('hide_new_button', False), {'context': context})135 self.hide_new_button = expr_eval(attrs.get('hide_new_button', False), {'context': context})
136 self.show_add_button = expr_eval(attrs.get('show_add_button', False), {'context': context})
137 if (self.o2m or self.m2m) and self.show_add_button:
138 self.hide_new_button = False
135 self.hide_delete_button = expr_eval(attrs.get('hide_delete_button', False), {'context': context})139 self.hide_delete_button = expr_eval(attrs.get('hide_delete_button', False), {'context': context})
136 self.hide_edit_button = expr_eval(attrs.get('hide_edit_button', False), {'context': context})140 self.hide_edit_button = expr_eval(attrs.get('hide_edit_button', False), {'context': context})
137 except:141 except:

Subscribers

People subscribed via source and target branches

to all changes: