root 1 year ago
parent
commit
de1a46e999
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      models/payment_transaction.py

+ 9
- 0
models/payment_transaction.py View File

@ -32,7 +32,16 @@ class PaymentTransaction(models.Model):
string='Online payment', copy=False, readonly=True)
reference2=fields.Char('type',compute='compute_reference')
invoice_bug=fields.Boolean(string="invoice bug", compute='_compute_invoice_bug',store=True)
def _compute_invoice_bug(self):
for rec in self:
rec.invoice_bug=False
for invoice in rec.invoice_ids:
if rec.state in ['done','authorized'] and invoice.payment_state!='paid' and invoice.state=='posted':
rec.invoice_bug=True
def compute_reference(self):
for rec in self:
rec.reference2='Participation'


Loading…
Cancel
Save