diff options
| author | Yannick Tivisse <yti@odoo.com> | 2015-09-14 14:07:19 +0200 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2015-09-22 11:33:58 +0200 |
| commit | e5181b05f73364c424ab3e7cef186501b2dcb63a (patch) | |
| tree | 5a3204d699927804a9bcf96357b64b3d30b833a2 /addons/project/project.py | |
| parent | 8c8fee29ea3ee9737f4da19e7eed2f9937232517 (diff) | |
[FIX] web_kanban, web: KanbanSelection widget refactoring
- Change the widget behavior from asynchronous to asynchronous, by adding 3 related fields
on the project.task model, which are the custom labels defined for the stage
- Instead of making a rpc call, we are taking directly the labels on the parent for the kanban view,
or on the view datarecord for the form view
- There are now 2 templates for the kanban view or the form view
- The development has been backported in the community version
- The options attribute has been removed on the project_view.xml file for the kanban_state field
Diffstat (limited to 'addons/project/project.py')
| -rw-r--r-- | addons/project/project.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/project/project.py b/addons/project/project.py index e61251e465a..c55a718a3a3 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -453,6 +453,9 @@ class task(osv.osv): 'attachment_ids': fields.one2many('ir.attachment', 'res_id', domain=lambda self: [('res_model', '=', self._name)], auto_join=True, string='Attachments'), # In the domain of displayed_image_id, we couln't use attachment_ids because a one2many is represented as a list of commands so we used res_model & res_id 'displayed_image_id': fields.many2one('ir.attachment', domain="[('res_model', '=', 'project.task'), ('res_id', '=', id), ('mimetype', 'ilike', 'image')]", string='Displayed Image'), + 'legend_blocked': fields.related("stage_id", "legend_blocked", type="char", string='Kanban Blocked Explanation'), + 'legend_done': fields.related("stage_id", "legend_done", type="char", string='Kanban Valid Explanation'), + 'legend_normal': fields.related("stage_id", "legend_normal", type="char", string='Kanban Ongoing Explanation'), } _defaults = { 'stage_id': _get_default_stage_id, @@ -637,7 +640,6 @@ class task(osv.osv): # user_id change: update date_assign if vals.get('user_id'): vals['date_assign'] = fields.datetime.now() - # context: no_log, because subtype already handle this create_context = dict(context, mail_create_nolog=True) task_id = super(task, self).create(cr, uid, vals, context=create_context) |
