[IMP] account_payment_order: Add payment_ref field to account.payment tree and form views

Co-authored-by: luc-demeyer

TT45153
This commit is contained in:
Víctor Martínez
2023-09-19 13:25:11 +02:00
parent 3699c7185c
commit e812ff8b70
3 changed files with 34 additions and 1 deletions

View File

@@ -27,6 +27,7 @@
"wizard/account_payment_line_create_view.xml",
"wizard/account_invoice_payment_line_multi_view.xml",
"views/account_payment_mode.xml",
"views/account_payment_views.xml",
"views/account_payment_order.xml",
"views/account_payment_line.xml",
"views/account_move_line.xml",

View File

@@ -126,7 +126,12 @@
string="Payment Transactions"
attrs="{'invisible': [('state', 'in', ('draft', 'cancel'))]}"
>
<field name="payment_ids" edit="0" create="0" />
<field
name="payment_ids"
edit="0"
create="0"
context="{'tree_view_ref': 'account_payment_order.view_account_payment_tree_payment_order'}"
/>
</page>
</notebook>
</sheet>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_account_payment_tree_payment_order" model="ir.ui.view">
<field name="name">account.payment.tree</field>
<field name="model">account.payment</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="account.view_account_payment_tree" />
<field name="arch" type="xml">
<field name="name" position="after">
<field name="payment_reference" />
</field>
</field>
</record>
<record id="view_account_payment_form" model="ir.ui.view">
<field name="name">account.payment.form</field>
<field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_form" />
<field name="arch" type="xml">
<field name="ref" position="after">
<field
name="payment_reference"
attrs="{'invisible': [('payment_reference', '=', False)]}"
/>
</field>
</field>
</record>
</odoo>