Update dev_membership.py
This commit is contained in:
parent
b2472360aa
commit
86a9fe3072
|
|
@ -133,12 +133,12 @@ class DevMembership(models.Model):
|
|||
if self.product_id.gender and self.partner_id.gender != self.product_id.gender:
|
||||
raise ValidationError(_('Membership is only %s allowed') % self.product_id.gender)
|
||||
|
||||
if record.membership_fees < (record.product_id.list_price * record.duration):
|
||||
if self.membership_fees < (self.product_id.list_price * self.duration):
|
||||
raise ValidationError(
|
||||
_("Membership fees cannot be less than %s .") % (record.product_id.list_price * record.duration,))
|
||||
if record.duration < record.product_id.duration:
|
||||
_("Membership fees cannot be less than %s .") % (self.product_id.list_price * self.duration,))
|
||||
if self.duration < self.product_id.duration:
|
||||
raise ValidationError(
|
||||
_("Duration cannot be less than the default value in Setting of membrship type.%s'") % record.product_id.duration)
|
||||
_("Duration cannot be less than the default value in Setting of membrship type.%s'") % self.product_id.duration)
|
||||
self.state = 'confirm'
|
||||
|
||||
def action_active_membership(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue