[FIX] payment_stripe: adapt a view to work without a group element
This commit replaces the `group` element containing the "Connect Stripe" button by a `div` element to allow it to contain more elements than the button without having the elements' `attrs` conflicting with each other. task-2982357 closes odoo/odoo#102579 X-original-commit: f99b067dbfedca361605f0fc63c7913333950b64 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
@@ -7,16 +7,16 @@
|
||||
<field name="inherit_id" ref="payment.payment_provider_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='code']" position="before">
|
||||
<group invisible="context.get('stripe_onboarding', False)"
|
||||
name="stripe_onboarding_group"
|
||||
attrs="{'invisible': ['|', '|', ('code', '!=', 'stripe'), ('stripe_secret_key', '!=', False), ('stripe_publishable_key', '!=', False)]}">
|
||||
<div invisible="context.get('stripe_onboarding', False)"
|
||||
name="stripe_onboarding_group"
|
||||
attrs="{'invisible': ['|', '|', ('code', '!=', 'stripe'), ('stripe_secret_key', '!=', False), ('stripe_publishable_key', '!=', False)]}">
|
||||
<button string="Connect Stripe"
|
||||
type="object"
|
||||
name="action_stripe_connect_account"
|
||||
class="btn-primary"
|
||||
colspan="2"
|
||||
attrs="{'invisible': [('state', '=', 'enabled')]}"/>
|
||||
</group>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='code']" position="inside">
|
||||
<group attrs="{'invisible': [('code', '!=', 'stripe')]}" name="stripe_credentials">
|
||||
|
||||
Reference in New Issue
Block a user