From dc88b0d9c4ef007b7b255e4f6cba8a356cd1ad91 Mon Sep 17 00:00:00 2001 From: michel Date: Thu, 1 Feb 2018 10:34:02 +0100 Subject: [PATCH] [TMP] Date for is_recurent. --- golem_activity/models/golem_activity.py | 3 +++ golem_activity/views/golem_activity_views.xml | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/golem_activity/models/golem_activity.py b/golem_activity/models/golem_activity.py index 7664279..6ad49ca 100644 --- a/golem_activity/models/golem_activity.py +++ b/golem_activity/models/golem_activity.py @@ -30,6 +30,7 @@ class GolemActivityType(models.Model): name = fields.Char('Activity type', required=True, translate=True) is_recurrent = fields.Boolean('Is recurrent?') + class GolemActivity(models.Model): """ GOLEM Activity """ _name = 'golem.activity' @@ -46,6 +47,8 @@ class GolemActivity(models.Model): full_name = fields.Char('Name', compute='_compute_full_name', store=True, index=True) + display_date = fields.Boolean('Display date?', default=True) + @api.multi @api.depends('name', 'default_code') diff --git a/golem_activity/views/golem_activity_views.xml b/golem_activity/views/golem_activity_views.xml index 0912382..1f57ed0 100644 --- a/golem_activity/views/golem_activity_views.xml +++ b/golem_activity/views/golem_activity_views.xml @@ -59,10 +59,14 @@ along with this program. If not, see . attrs="{'invisible': [('is_recurrent', '=', False)]}" /> + + attrs="{'invisible':[('is_recurrent', '=', True), + ('display_date', '=', False)]}" /> + attrs="{'invisible':[('is_recurrent', '=', True), + ('display_date', '=', False)]}" />