Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
1294 Vistas

Hello,

I am experiencing an issue with the "Pay" button in testing new odoo 18 instance on-premise. After validating the payment of an invoice that is fully settled, the "Pay" button remains visible, whereas it should disappear or be disabled.

Steps to Reproduce the Issue:

  1. Create a new customer invoice via Invoicing > Customer Invoices.
  2. Validate the invoice.
  3. Register a payment to fully settle the invoice.
  4. Observe that the "Pay" button remains visible, even though the invoice status is "Paid."

Observed Issue:

  • The "Pay" button remains active after full payment.
  • This can be confusing for the user, as it might seem like the payment has not been fully validated.

What I’ve Tried:

  • Checked the configuration settings of the account module.
  • Tested with a clean database to rule out data issues.

Thank you in advance for your help!

Avatar
Descartar
Mejor respuesta

If the "Pay" button is still showing after the invoice is fully paid, it's likely because the invoice isn't properly marked as Paid. Please check the residual amount—it should be 0.00. Sometimes, even if the payment is done, it's not fully reconciled with the invoice. Also, if you're using any custom code or modules, they might affect the visibility of the button. In standard Odoo, once an invoice is fully paid and reconciled, the "Pay" button should disappear automatically.

Avatar
Descartar
Mejor respuesta

Hi,


In Odoo, the visibility of the "Pay" button on a customer invoice is controlled in the form view by conditions that check the invoice's state and sometimes its residual amount (amount_residual).

What you’re seeing in Odoo 18 on-premise sounds like either:

  • A view condition regression in the new version, or
  • The amount_residual not being computed to 0.0 because of rounding or partial reconciliation issues.

To fix this issue, follow the method below.

1- Change the visibility attribute of the button from UI as,

2- Through code.

 Try the code below in your custom module.

<xpath expr="//button[@name='action_register_payment']" position="attributes">
<attribute name="invisible">(state != 'posted' or payment_state not in ('not_paid', 'partial', 'in_payment')</attribute>
</xpath>


Hope it helps

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
mar 25
1475
0
ago 25
146
2
ago 25
698
2
ago 25
424
4
ago 25
423