diff --git a/coworking_relation/models/relation.py b/coworking_relation/models/relation.py index f4c47c8..696f636 100644 --- a/coworking_relation/models/relation.py +++ b/coworking_relation/models/relation.py @@ -10,4 +10,14 @@ class CoworkerRelation(models.Model): _description = 'relation model definition' _order = 'id asc' - titre = fields.Char() + name = fields.Char() + + coworker1 = fields.Many2one( + 'coworking.coworker', 'Coworker', index=True, required=True, + domain="[('coworker_type', 'in', ['staffer', 'member', 'worker', 'volunteer', 'visitor'])]" + ) + coworker2 = fields.Many2one( + 'coworking.coworker', 'Coworker', index=True, required=True, + domain="[('coworker_type', 'in', ['staffer', 'member', 'worker', 'volunteer', 'visitor'])]" + ) + relation = fields.Char(index=True, required=True) diff --git a/coworking_relation/views/coworker_views.xml b/coworking_relation/views/coworker_views.xml new file mode 100644 index 0000000..68f5668 --- /dev/null +++ b/coworking_relation/views/coworker_views.xml @@ -0,0 +1,24 @@ + + + + + + + Coworker Form adaptations + coworking.coworker + + + + + + + + + + + + + + + diff --git a/coworking_relation/views/relation_views.xml b/coworking_relation/views/relation_views.xml index ac04da6..3882f78 100644 --- a/coworking_relation/views/relation_views.xml +++ b/coworking_relation/views/relation_views.xml @@ -2,15 +2,23 @@ - - Relation Form - coworking.relation - -
- - - -
-
-
+ + Relation Form + coworking.relation + +
+ + + + + + + + + +
+
+
+ +