Files
odoo_source/addons/payment/wizards/payment_link_wizard_views.xml
T
Anita (anko) 4d1a1f1c99 [IMP] payment, *: verify and reroute payment flows
This commit changes the way transactions linked to a document (sales
order, invoice...) are created in a payment flow. Rather than receiving
and trusting the transaction values from the controller, they are now
read from the linked document, and the payment flow is rerouted to use
the document's module's controllers instead of that of `payment`.

This ensures that no unexpected value can be passed to the `create`
method of a transaction, and simplifies the implementation of the
payment flows of linked documents.

task-3136240

closes odoo/odoo#126425

Related: odoo/enterprise#43212
Related: odoo/upgrade#5124
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-09-23 21:08:01 +00:00

50 lines
2.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="payment_link_wizard_view_form" model="ir.ui.view">
<field name="name">payment.link.wizard.form</field>
<field name="model">payment.link.wizard</field>
<field name="arch" type="xml">
<form string="Generate Payment Link">
<div class="alert alert-warning fw-bold"
role="alert"
invisible="partner_email">
This partner has no email, which may cause issues with some payment providers.
Setting an email for this partner is advised.
</div>
<group>
<group>
<field name="res_id" invisible="1"/>
<field name="res_model" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="partner_email" invisible="1"/>
<field name="amount_max" invisible="1"/>
<field name="amount"/>
<field name="warning_message" invisible="1"/>
<field name="currency_id" invisible="1"/>
</group>
</group>
<div name="payment_link_warning_information"
class="alert alert-warning text-center fw-bold"
role="alert"
invisible="warning_message == ''">
<field name="warning_message"/>
</div>
<footer>
<field name="link"
string="Generate and Copy Payment Link"
readonly="1"
disabled="bool(warning_message)"
widget="CopyClipboardButton"
data-hotkey="q"/>
<button string="Close"
class="btn btn-secondary rounded-2"
special="cancel"
data-hotkey="x"/>
</footer>
</form>
</field>
</record>
</odoo>