[FIX] event: fixed the invoice payment state test in the barcode interface
PURPOSE There has been a few changes in the accounting module since the version 12.4. The field 'invoice_ids' in the 'sale.order' model is now related to the 'account.move' model instead of the 'account.invoice' model. The field that contain the payment state is now called 'invoice_payment_state'. This field changed name again in master into 'payment_state'. SPECIFICATION Change the call from 'invoice.state' into 'invoice.payment_state'. LINKS Task ID : 2180184 PR : #43822 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -76,7 +76,7 @@ class EventRegistration(models.Model):
|
||||
order_line = self.sale_order_line_id.sudo()
|
||||
if not order or float_is_zero(order_line.price_total, precision_digits=order.currency_id.rounding):
|
||||
payment_status = _('Free')
|
||||
elif not order.invoice_ids or any(invoice.state != 'paid' for invoice in order.invoice_ids):
|
||||
elif not order.invoice_ids or any(invoice.payment_state != 'paid' for invoice in order.invoice_ids):
|
||||
payment_status = _('To pay')
|
||||
res['alert'] = _('The registration must be paid')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user