[FIX] payment: show the payment methods buttons only on active providers

When the payment provider was disabled, the "Enabled Payment Buttons"
was shown, although it was not possible to enable them yet. The button
is now hidden until the provider's state is set to either 'enabled' or
'test'.

Part-of: odoo/odoo#148865
This commit is contained in:
Antoine Vandevenne (anv)
2024-01-10 21:04:35 +00:00
parent 47a07dc53d
commit 59520da5ec
@@ -81,6 +81,7 @@
string="Payment Methods"
domain="[('is_primary', '=', True)]"
readonly="True"
invisible="state == 'disabled'"
widget="many2many_tags"
/>
<div colspan="2">
@@ -88,6 +89,7 @@
name="action_view_payment_methods"
class="btn btn-link"
role="button"
invisible="state == 'disabled'"
>
<i class="oi oi-fw o_button_icon oi-arrow-right"/>
Enable Payment Methods