diff --git a/easy_my_coop_online_payment/models/coop.py b/easy_my_coop_online_payment/models/coop.py index e0ab4de..3ff0ee9 100644 --- a/easy_my_coop_online_payment/models/coop.py +++ b/easy_my_coop_online_payment/models/coop.py @@ -16,7 +16,7 @@ class AccountInvoice(models.Model): _inherit = 'account.invoice' def post_process_confirm_paid(self, effective_date): - if self.payment_type == 'deferred': + if self.subscription_request.payment_type == 'deferred': self.set_cooperator_effective(effective_date) return True \ No newline at end of file