After the payment apocalypse, `payment_test` was cleaned and stripped of all useless parts. It was a very basic testing acquirer that allowed to enter fake arbitrary payment details, choose whether they should be tokenized, and then pay. It was intended to test the payment flow of various applications (Sales, Subscriptions, Invoicing, ...) for a single scenario: successful payments with immediate capture. In order to extensively test an app's payment flow (explore other scenarios), we need `payment_test` to have additional features. Now, `payment_test` will allow profound testing of these features: - separate authorization and capture - customer fees computation - tokenization - refunds - on the /pay page, users will be able to select the status of the payment - on the payment transaction form view, users can change the status of a payment 'pending' to either succeed or fail - on the payment token form view, users can change the state of future transactions made with that token task-2512196 closes odoo/odoo#78083 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com> Co-authored-by: xlu-odoo <xlu@odoo.com>
34 lines
1.6 KiB
XML
34 lines
1.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="payment_transaction_form_inherit_payment_test" model="ir.ui.view">
|
|
<field name="name">Test Transaction Form</field>
|
|
<field name="model">payment.transaction</field>
|
|
<field name="inherit_id" ref="payment.payment_transaction_form"/>
|
|
<field name="arch" type="xml">
|
|
<header position="inside">
|
|
<field name="capture_manually" invisible="1"/>
|
|
<button string="Authorize"
|
|
type="object"
|
|
name="action_test_set_done"
|
|
class="oe_highlight"
|
|
attrs="{'invisible': ['|', '|', ('provider', '!=', 'test'), ('capture_manually', '=', False), ('state', '!=', 'pending')]}"/>
|
|
<button string="Confirm"
|
|
type="object"
|
|
name="action_test_set_done"
|
|
class="oe_highlight"
|
|
attrs="{'invisible': ['|', '|', ('provider', '!=', 'test'), ('capture_manually', '=', True), ('state', '!=', 'pending')]}"/>
|
|
<button string="Cancel"
|
|
type="object"
|
|
name="action_test_set_canceled"
|
|
attrs="{'invisible': ['|', ('provider', '!=', 'test'), ('state', '!=', 'pending')]}"/>
|
|
<button string="Set to Error"
|
|
type="object"
|
|
name="action_test_set_error"
|
|
attrs="{'invisible': ['|', ('provider', '!=', 'test'), ('state', '!=', 'pending')]}"/>
|
|
</header>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|