[MIG] sale_down_payment to v14

This commit is contained in:
Alexis de Lattre
2024-03-15 15:23:43 +01:00
parent 282e7142db
commit b353bb14a5
14 changed files with 205 additions and 109 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2019 Akretion France (http://www.akretion.com/)
Copyright 2019-2024 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
@@ -8,14 +8,6 @@
<odoo>
<record id="sale_account_payment_action" model="ir.actions.act_window">
<field name="name">Register Payment</field>
<field name="res_model">account.payment</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account.view_account_payment_invoice_form"/>
<field name="target">new</field>
</record>
<record id="view_order_form" model="ir.ui.view">
<field name="name">advance_payment.sale.order.form</field>
<field name="model">sale.order</field>
@@ -23,7 +15,7 @@
<field name="arch" type="xml">
<notebook position="inside">
<page name="advance_payment" string="Advance Payments">
<field name="payment_line_ids" nolabel="1"/>
<field name="payment_ids" nolabel="1" colspan="2"/>
<field name="amount_residual" invisible="1"/>
</page>
</notebook>
@@ -34,7 +26,7 @@
<field name="amount_down_payment" nolabel="1" class="oe_subtotal_footer_separator"/>
</field>
<button name="action_cancel" position="before">
<button type="action" name="%(sale_account_payment_action)d" string="Register Payment" attrs="{'invisible': ['|', ('amount_residual', '&lt;=', 0), ('invoice_status', '=', 'invoiced')]}"/>
<button type="action" name="%(sale_down_payment.account_payment_register_sale_action)d" string="Register Payment" attrs="{'invisible': ['|', ('amount_residual', '&lt;=', 0), ('invoice_status', '=', 'invoiced')]}"/>
</button>
</field>
</record>