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
1=== modified file 'addons/openerp/widgets/listgrid.py'
2--- addons/openerp/widgets/listgrid.py 2016-09-08 12:22:46 +0000
3+++ addons/openerp/widgets/listgrid.py 2017-01-16 15:37:42 +0000
4@@ -130,8 +130,12 @@
5 self.hide_new_button = False
6 self.hide_delete_button = False
7 self.hide_edit_button = False
8+ self.show_add_button = False
9 try:
10 self.hide_new_button = expr_eval(attrs.get('hide_new_button', False), {'context': context})
11+ self.show_add_button = expr_eval(attrs.get('show_add_button', False), {'context': context})
12+ if (self.o2m or self.m2m) and self.show_add_button:
13+ self.hide_new_button = False
14 self.hide_delete_button = expr_eval(attrs.get('hide_delete_button', False), {'context': context})
15 self.hide_edit_button = expr_eval(attrs.get('hide_edit_button', False), {'context': context})
16 except:

Subscribers

People subscribed via source and target branches

to all changes: