openerp - Tasks in Kanban View: card rearrangement error when Project/User is only authorized to modify his own tasks -


this happens when project/user drops task unto destination stage containing tasks not owned him.

apparently, odoo remembers stack ordering of tasks within stage via project.task.sequence, , updates task cards' sequence fields when project/user completes drop action. since project/user not authorized modify other users' tasks (of project.task object type). odoo server raises exception shown below.

enter image description here

access restriction implemented via following record rule project/user:

name: project/task: assignee , creator can modify task object: task (project.task) apply for: write domain filter: ['|',('user_id','=',user.id),('create_uid','=',user.id)]  group name: project/user 

is there workaround problem?

at time of writing, error can reproduced @ http://demo.odoo.com running odoo version 8.saas~6.

note default human resources / employees allowed modify tasks not assigned them, write , delete access of record rule "project/task: employees: public, portal, employee or (followers , following)" must first removed.

couldn't think of better solution, did following hack instead:

add top portion of _write function of openerp.models.basemodel in file odoo_root/models.py:

def _write(self, cr, user, ids, vals, context=none):     # use admin if writing 'sequence' field of model 'project.task'     if self._name == 'project.task' , vals.keys() == ['sequence']:         user = superuser_id 

this ok since sequence field not important field protect casual modification non-owners.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -