Browse Source

[IMP] cannot validate a subscription request with share number smaller

or equal 0
pull/1/head
houssine 7 years ago
parent
commit
0324a06793
  1. 2
      easy_my_coop/models/coop.py

2
easy_my_coop/models/coop.py

@ -289,6 +289,8 @@ class subscription_request(models.Model):
def validate_subscription_request(self):
partner_obj = self.env['res.partner']
if self.ordered_parts <= 0:
raise UserError(_('Number of share must be greater than 0.'))
if self.partner_id:
if not self.partner_id.cooperator:
self.partner_id.cooperator = True

Loading…
Cancel
Save