From 3965408b6e5704784b7cdc97a1552ec30012f4ab Mon Sep 17 00:00:00 2001 From: houssine Date: Thu, 1 Mar 2018 11:28:44 +0100 Subject: [PATCH] [IMP] make if statement understandable --- easy_my_coop/models/coop.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/easy_my_coop/models/coop.py b/easy_my_coop/models/coop.py index f87ecdf..6557bf8 100644 --- a/easy_my_coop/models/coop.py +++ b/easy_my_coop/models/coop.py @@ -93,10 +93,11 @@ class subscription_request(models.Model): except ValidationError: validated = False - if not sub_request.is_company and (sub_request.skip_control_ng or self.check_belgian_identification_id(sub_request.no_registre)): - validated = True - else: - validated = False + if not sub_request.is_company: + if sub_request.skip_control_ng or self.check_belgian_identification_id(sub_request.no_registre): + validated = True + else: + validated = False sub_request.validated = validated @api.multi @api.depends('share_product_id', 'share_product_id.list_price','ordered_parts')