Browse Source

[FIX] override function to not send capital release request by mail in

case of the payment is online
pull/1/head
houssine 8 years ago
parent
commit
58ef10818f
  1. 9
      easy_my_coop_online_payment/models/coop.py

9
easy_my_coop_online_payment/models/coop.py

@ -1,8 +1,13 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from openerp import api, fields, models, _ from openerp import api, fields, models, _
class subscription_request(models.Model):
class SubscriptionRequest(models.Model):
_inherit = 'subscription.request' _inherit = 'subscription.request'
payment_type = fields.Selection([('online', 'Online'), payment_type = fields.Selection([('online', 'Online'),
('deferred', 'Deferred')], string='Payment Type')
('deferred', 'Deferred')], string='Payment Type')
def send_capital_release_request(self, invoice):
if self.payment_type == 'deferred':
super(SubscriptionRequest, self).send_capital_release_request(invoice)
return True
Loading…
Cancel
Save