Browse Source

transaction

dev-rcn
root 3 years ago
parent
commit
1119576db0
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      models/payment_transaction.py

+ 4
- 1
models/payment_transaction.py View File

@ -81,7 +81,10 @@ class PaymentTransaction(models.Model):
invoice=self.env['account.move'].sudo().search([('name','=',invoices.name)]) invoice=self.env['account.move'].sudo().search([('name','=',invoices.name)])
reg=self.env['event.registration'].sudo().search(['|','|',('invoice_id','=',invoice.id),('balance_invoice_id','=',invoice.id),('down_payment_invoice_id','=',invoice.id)]) reg=self.env['event.registration'].sudo().search(['|','|',('invoice_id','=',invoice.id),('balance_invoice_id','=',invoice.id),('down_payment_invoice_id','=',invoice.id)])
if reg: if reg:
return 'txR-'+invoice.name
if reg.event_id.booking_event:
return 'txR-'+invoice.name
else:
return 'txP-'+invoice.name
else: else:
return 'txP-'+invoice.name return 'txP-'+invoice.name
else: else:


Loading…
Cancel
Save