[IMP] website(_sale,_payment,_sale_picking): improve provider options

When no payment provider is active, admin users should see the 'Activate
Stripe' button on the checkout page, allowing them to configure Stripe
faster.

This commit also disables the provider 'Pay in store when picking the
product' in the demo data to improve the testing experience of the
eCommerce settings on runbot.

task-3235154

closes odoo/odoo#121138

Related: odoo/enterprise#40934
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
Valeriya(vchu)
2023-07-13 19:27:55 +02:00
committed by Antoine Vandevenne (anv)
parent 51b1808ebe
commit 6bc5cef302
10 changed files with 88 additions and 24 deletions
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="action_activate_stripe" model="ir.actions.server">
<field name="name">Activate Stripe</field>
<field name="model_id" ref="website_payment.model_payment_provider"/>
<field name="state">code</field>
<field name="code">
menu = env.ref('website.menu_website_website_settings', raise_if_not_found=False)
menu_id = menu and menu.id
action = env.company._run_payment_onboarding_step(menu_id=menu_id)
</field>
</record>
</odoo>