houssine
6 years ago
4 changed files with 36 additions and 28 deletions
-
11easy_my_coop_fr/models/coop.py
-
24easy_my_coop_online_payment/models/coop.py
-
20easy_my_coop_online_payment/models/payment_transaction.py
-
9easy_my_coop_recompute_coop_number/wizard/cooperator_number_wizard.py
@ -1,22 +1,26 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from openerp import api, fields, models, _ |
|||
from openerp import fields, models |
|||
|
|||
|
|||
class SubscriptionRequest(models.Model): |
|||
_inherit = 'subscription.request' |
|||
|
|||
payment_type = fields.Selection([('online', 'Online'), |
|||
('deferred', 'Deferred')], string='Payment Type', default="deferred") |
|||
|
|||
def send_capital_release_request(self, invoice): |
|||
('deferred', 'Deferred')], |
|||
string='Payment Type', |
|||
default="deferred") |
|||
|
|||
def send_capital_release_request(self, inv): |
|||
if self.payment_type == 'deferred': |
|||
super(SubscriptionRequest, self).send_capital_release_request(invoice) |
|||
super(SubscriptionRequest, self).send_capital_release_request(inv) |
|||
return True |
|||
|
|||
|
|||
|
|||
class AccountInvoice(models.Model): |
|||
_inherit = 'account.invoice' |
|||
|
|||
|
|||
def post_process_confirm_paid(self, effective_date): |
|||
if self.subscription_request.payment_type == 'deferred': |
|||
self.set_cooperator_effective(effective_date) |
|||
|
|||
return True |
|||
self.set_cooperator_effective(effective_date) |
|||
|
|||
return True |
Write
Preview
Loading…
Cancel
Save
Reference in new issue