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. 4
      easy_my_coop/models/coop.py

4
easy_my_coop/models/coop.py

@ -288,7 +288,9 @@ class subscription_request(models.Model):
@api.one @api.one
def validate_subscription_request(self): def validate_subscription_request(self):
partner_obj = self.env['res.partner'] 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 self.partner_id:
if not self.partner_id.cooperator: if not self.partner_id.cooperator:
self.partner_id.cooperator = True self.partner_id.cooperator = True

Loading…
Cancel
Save