[FIX] sale_service: Allow a project user to close a task.
Closing a task associated to a sale order line requires the write access to the according sale order line, that a user who is only a Project > User does not have by default. Fixes #9286 Closes #9352
This commit is contained in:
parent
4324891529
commit
0ea130424d
|
@ -19,6 +19,7 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import SUPERUSER_ID
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.tools.translate import _
|
||||
|
||||
|
@ -127,7 +128,7 @@ class project_task(osv.osv):
|
|||
proc_obj = self.pool.get("procurement.order")
|
||||
for task in self.browse(cr, uid, ids, context=context):
|
||||
if task.procurement_id:
|
||||
proc_obj.check(cr, uid, [task.procurement_id.id], context=context)
|
||||
proc_obj.check(cr, SUPERUSER_ID, [task.procurement_id.id], context=context)
|
||||
|
||||
def write(self, cr, uid, ids, values, context=None):
|
||||
""" When closing tasks, validate subflows. """
|
||||
|
|
Loading…
Reference in New Issue