<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 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).
-->

<odoo>


<record id="account_payment_register_sale_form" model="ir.ui.view">
    <field name="model">account.payment.register.sale</field>
    <field name="arch" type="xml">
        <form>
            <group name="main">
                <field name="sale_id" invisible="1"/>
                <field name="company_id" invisible="1"/>
                <field name="date"/>
                <field name="journal_id" widget="selection"/>
                <label for="amount"/>
                <div name="amount" class="o_row">
                    <field name="amount"/>
                    <field name="currency_id" options="{'no_create': True, 'no_open': True}" groups="base.group_multi_currency"/>
            </div>
                <field name="ref"/>
            </group>
            <footer>
                <button name="run" type="object" string="Register Payment" class="btn-primary"/>
                <button special="cancel" string="Cancel"/>
            </footer>
        </form>
    </field>
</record>

<record id="account_payment_register_sale_action" model="ir.actions.act_window">
    <field name="name">Register Payment from Sale Order</field>
    <field name="res_model">account.payment.register.sale</field>
    <field name="view_mode">form</field>
    <field name="target">new</field>
</record>


</odoo>
