[FIX] payment_custom: hide payment methods buttons on custom providers

Custom-flow payment providers should not allow assigning a different
payment method than the one that was set.

Part-of: odoo/odoo#148865
This commit is contained in:
Antoine Vandevenne (anv)
2024-01-10 21:04:35 +00:00
parent 59520da5ec
commit ec6cc3511a
@@ -9,6 +9,12 @@
<field name="code" invisible="1" position="after">
<field name="custom_mode" invisible="1"/>
</field>
<field name="payment_method_ids" position="attributes">
<attribute name="invisible">state == 'disabled' or code == 'custom'</attribute>
</field>
<a name="action_view_payment_methods" position="attributes">
<attribute name="invisible">state == 'disabled' or code == 'custom'</attribute>
</a>
<field name="capture_manually" position="after">
<field name="qr_code" invisible="code != 'custom'" />
</field>