From 68277e9cdb3f01d85909d337426a855778fa8e79 Mon Sep 17 00:00:00 2001 From: houssine Date: Thu, 20 Dec 2018 14:06:46 +0100 Subject: [PATCH] [IMP] put on the waiting list Add the possibility to put a subscription request on the waiting list. add a waiting state the action to update the state and the related button on the form --- easy_my_coop/models/coop.py | 5 +++++ easy_my_coop/view/subscription_request_view.xml | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/easy_my_coop/models/coop.py b/easy_my_coop/models/coop.py index 3203223..5d59af6 100644 --- a/easy_my_coop/models/coop.py +++ b/easy_my_coop/models/coop.py @@ -125,6 +125,7 @@ class subscription_request(models.Model): state = fields.Selection([('draft','Draft'), ('block','Blocked'), ('done','Done'), + ('waiting','Waiting'), ('transfer','Transfer'), ('cancelled','Cancelled'), ('paid','paid')], @@ -358,6 +359,10 @@ class subscription_request(models.Model): @api.one def cancel_subscription_request(self): self.write({'state':'cancelled'}) + + @api.one + def put_on_waiting_list(self): + self.write({'state':'waiting'}) class share_line(models.Model): _name='share.line' diff --git a/easy_my_coop/view/subscription_request_view.xml b/easy_my_coop/view/subscription_request_view.xml index e78a19e..090fbf5 100644 --- a/easy_my_coop/view/subscription_request_view.xml +++ b/easy_my_coop/view/subscription_request_view.xml @@ -34,7 +34,8 @@
-