Merge lp:~julie-w/unifield-server/US-9089 into lp:unifield-server

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~julie-w/unifield-server/US-9089
Merge into: lp:unifield-server
Diff against target: 24 lines (+4/-3)
1 file modified
bin/addons/analytic_distribution/account_commitment.py (+4/-3)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-9089
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+409196@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/addons/analytic_distribution/account_commitment.py'
--- bin/addons/analytic_distribution/account_commitment.py 2021-08-17 13:24:42 +0000
+++ bin/addons/analytic_distribution/account_commitment.py 2021-09-27 10:27:15 +0000
@@ -86,8 +86,9 @@
8686
87 def _display_super_done_button(self, cr, uid, ids, name, arg, context=None):87 def _display_super_done_button(self, cr, uid, ids, name, arg, context=None):
88 """88 """
89 For now the "Super" Done button, which allows to always set a CV to Done whatever its state and origin,89 The "Super" Done button, which allows to always set a CV to Done whatever its state and origin, is displayed:
90 is visible only by the Admin user. It is displayed only when the standard Done button isn't usable.90 - when the standard Done button isn't usable.
91 - only for some "admin" users (the restriction is made by User Rights).
91 """92 """
92 if context is None:93 if context is None:
93 context = {}94 context = {}
@@ -96,7 +97,7 @@
96 res = {}97 res = {}
97 for cv in self.read(cr, uid, ids, ['state', 'type'], context=context):98 for cv in self.read(cr, uid, ids, ['state', 'type'], context=context):
98 other_done_button_usable = cv['state'] == 'open' and cv['type'] not in ('external', 'intermission', 'intersection')99 other_done_button_usable = cv['state'] == 'open' and cv['type'] not in ('external', 'intermission', 'intersection')
99 res[cv['id']] = not other_done_button_usable and uid == 1 and cv['state'] != 'done'100 res[cv['id']] = not other_done_button_usable and cv['state'] != 'done'
100 return res101 return res
101102
102 _columns = {103 _columns = {

Subscribers

People subscribed via source and target branches