From 3f7865bba3c9eef5094e8aa6b0cd34cf765c903a Mon Sep 17 00:00:00 2001 From: michel Date: Fri, 24 Nov 2017 18:49:25 +0100 Subject: [PATCH] Position fields --- .../views/res_partner_views.xml | 21 ++++++++++++------- coworking_event/models/event.py | 2 +- .../wizard/coworking_event_weekly.py | 2 +- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/coworking_coworker/views/res_partner_views.xml b/coworking_coworker/views/res_partner_views.xml index 6efdcd7..6ed04a7 100644 --- a/coworking_coworker/views/res_partner_views.xml +++ b/coworking_coworker/views/res_partner_views.xml @@ -3,16 +3,23 @@ - Res_partner Form + >res.partner.form.inherit res.partner - - - - - + + + + + + + + + + + + + - diff --git a/coworking_event/models/event.py b/coworking_event/models/event.py index 2e08134..355285c 100644 --- a/coworking_event/models/event.py +++ b/coworking_event/models/event.py @@ -15,7 +15,7 @@ class Event(models.Model): title = fields.Char(required=True) - manager_id = fields.Many2one('coworking.coworker', 'Manager', index=True, required=True, + manager_id = fields.Many2one('coworking.res_partner', 'Manager', index=True, required=True, domain="[('coworker_type', 'in', ['staffer', 'member'])]") date_start = fields.Datetime(default=fields.Date.context_today, required=True) starts_this_week = fields.Integer(compute='_compute_starts_this_week', diff --git a/coworking_event/wizard/coworking_event_weekly.py b/coworking_event/wizard/coworking_event_weekly.py index e13951f..fdf782e 100644 --- a/coworking_event/wizard/coworking_event_weekly.py +++ b/coworking_event/wizard/coworking_event_weekly.py @@ -14,7 +14,7 @@ class CoworkingEventWeekly(models.TransientModel): _description = 'Weekly massive event creation' title = fields.Char(required=True) - manager_id = fields.Many2one('coworking.coworker', string='Manager', + manager_id = fields.Many2one('coworking.res_partner', string='Manager', required=True) date_start_recurence = fields.Datetime('Date start', required=True) date_stop_recurence = fields.Datetime('Date stop', required=True)