forked from Mapan/odoo17e
193 lines
11 KiB
XML
193 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record model="ir.actions.server" id="action_account_create_batch_payment">
|
|
<field name="name">Create batch payment</field>
|
|
<field name="model_id" ref="account.model_account_payment"/>
|
|
<field name="binding_model_id" ref="account.model_account_payment"/>
|
|
<field name="binding_view_types">list</field>
|
|
<field name="state">code</field>
|
|
<field name="code">
|
|
if records:
|
|
action = records.create_batch_payment()
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_batch_payment_form" model="ir.ui.view">
|
|
<field name="name">account.batch.payment.form</field>
|
|
<field name="model">account.batch.payment</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Batch Payment">
|
|
<header>
|
|
<field name="id" invisible="1"/>
|
|
<field name="file_generation_enabled" invisible="1"/>
|
|
<button name="print_batch_payment" string="Print" type="object" invisible="state != 'sent'"/>
|
|
<button name="validate_batch_button" string="Re-generate Export File" type="object" invisible="not file_generation_enabled or state != 'sent' or not payment_ids"/>
|
|
<button name="validate_batch_button" class="oe_highlight" string="Validate" type="object" invisible="state != 'draft' or not payment_ids"/>
|
|
<field name="state" widget="statusbar"/>
|
|
</header>
|
|
<sheet>
|
|
<group>
|
|
<group>
|
|
<field name="batch_type" readonly="state != 'draft'"/>
|
|
<field name="journal_id" domain="[('type', '=', 'bank')]" options="{'no_open': True, 'no_create': True}" readonly="state != 'draft'"/>
|
|
<field name="currency_id" invisible="1"/>
|
|
<field name="available_payment_method_ids" invisible="1"/>
|
|
<field name="payment_method_id" options="{'no_create': True, 'no_open': True}"
|
|
required="1"
|
|
readonly="state != 'draft' or payment_ids"/>
|
|
<field name="payment_method_code" invisible="1"/> <!--For use in modules depending on this one-->
|
|
</group><group>
|
|
<field name="date" readonly="state != 'draft'"/>
|
|
<field name="name" placeholder="Leave empty to generate automatically..." required="0" readonly="state != 'draft'"/>
|
|
</group>
|
|
</group>
|
|
|
|
<notebook>
|
|
<page string="Batch Content" name="batch_content">
|
|
<field name="payment_ids"
|
|
readonly="state != 'draft'"
|
|
force_save="1"
|
|
widget="many2many"
|
|
domain="[('batch_payment_id', '=', False), ('state', '=', 'posted'), ('is_move_sent', '=', False), ('payment_method_id', '=', payment_method_id), ('journal_id', '=', journal_id), ('payment_type','=',batch_type), ('amount', '!=', 0)]"
|
|
options="{'no_create': True}">
|
|
<tree string="Payments" decoration-muted="state == 'draft'" create="false">
|
|
<field name="name"/>
|
|
<field name="date" readonly="state in ['cancel', 'posted']"/>
|
|
<field name="partner_id"/>
|
|
<field name="ref"/>
|
|
<field name="payment_method_name" optional="hide" string="Payment method"/>
|
|
<field name="amount_signed" sum="Total" string="Amount"/>
|
|
<field name="currency_id" column_invisible="True"/>
|
|
<field name="state" column_invisible="True"/>
|
|
<field name="payment_method_id" column_invisible="True"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" groups="base.group_user"/>
|
|
<field name="activity_ids"/>
|
|
<field name="message_ids"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_batch_payment_search" model="ir.ui.view">
|
|
<field name="name">account.batch.payment.search</field>
|
|
<field name="model">account.batch.payment</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Batch Payment">
|
|
<field name="journal_id" />
|
|
<filter string="Unreconciled" domain="[('state','!=','reconciled')]" name="open"/>
|
|
|
|
<group expand="0" string="Group By">
|
|
<filter name="group_by_journal_id" string="Bank Journal" context="{'group_by':'journal_id'}"/>
|
|
<filter name="group_by_state" string="State" context="{'group_by':'state'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_batch_payment_tree" model="ir.ui.view">
|
|
<field name="name">account.batch.payment.tree</field>
|
|
<field name="model">account.batch.payment</field>
|
|
<field name="arch" type="xml">
|
|
<tree decoration-muted="state == 'reconciled'" decoration-info="state == 'draft'" sample="1">
|
|
<field name="name" readonly="state != 'draft'"/>
|
|
<field name="journal_id" readonly="state != 'draft'"/>
|
|
<field name="date" readonly="state != 'draft'"/>
|
|
<field name="amount"/>
|
|
<field name="state"/>
|
|
<field name="activity_ids" widget="list_activity" optional="show"/>
|
|
<field name="currency_id" column_invisible="True"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_batch_payment_in" model="ir.actions.act_window">
|
|
<field name="name">Customer Batch Payments</field>
|
|
<field name="res_model">account.batch.payment</field>
|
|
<field name="view_mode">tree,form,kanban,activity</field>
|
|
<field name="view_id" ref="view_batch_payment_tree"/>
|
|
<field name="search_view_id" ref="view_batch_payment_search"/>
|
|
<field name="domain" eval="[('batch_type', '=', 'inbound')]"/>
|
|
<field name="context">{'search_default_open': 1, 'default_batch_type': 'inbound'}</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Create a new customer batch payment
|
|
</p><p>
|
|
Batch payments allow you grouping different payments to ease
|
|
reconciliation. They are also useful when depositing checks
|
|
to the bank.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_batch_payment_out" model="ir.actions.act_window">
|
|
<field name="name">Vendor Batch Payments</field>
|
|
<field name="res_model">account.batch.payment</field>
|
|
<field name="view_mode">tree,form,kanban,activity</field>
|
|
<field name="view_id" ref="view_batch_payment_tree"/>
|
|
<field name="search_view_id" ref="view_batch_payment_search"/>
|
|
<field name="domain" eval="[('batch_type', '=', 'outbound')]"/>
|
|
<field name="context">{'search_default_open': 1, 'default_batch_type': 'outbound'}</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Create a new vendor batch payment
|
|
</p><p>
|
|
Batch payments allow you grouping different payments to ease
|
|
reconciliation. They are also useful when depositing checks
|
|
to the bank.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_account_move_kanban" model="ir.ui.view">
|
|
<field name="name">account.batch.payment.move.kanban</field>
|
|
<field name="model">account.batch.payment</field>
|
|
<field name="arch" type="xml">
|
|
<kanban class="o_kanban_mobile" sample="1" js_class="account_documents_kanban">
|
|
<field name="name"/>
|
|
<field name="date"/>
|
|
<field name="state"/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<div t-attf-class="oe_kanban_global_click">
|
|
<div class="row mb4">
|
|
<div class="col-6 o_kanban_record_headings">
|
|
<strong class="o_kanban_record_title">
|
|
<span>
|
|
<field name="name" readonly="state != 'draft'"/>
|
|
</span>
|
|
</strong>
|
|
</div>
|
|
<div class="col-6 text-end">
|
|
<strong><i class="fa fa-clock-o" aria-label="Date" role="img" title="Date"/> <t t-out="record.date.value"/></strong>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<span><field name="amount" widget='monetary'/></span>
|
|
<span><field name="currency_id" invisible="1"/></span>
|
|
</div>
|
|
<div class="col-6">
|
|
<span class="float-end">
|
|
<field name="state" widget="label_selection" options="{'classes': {'new': 'default', 'sent': 'default', 'reconciled': 'success'}}"/>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
|
|
<menuitem action="action_batch_payment_in" name="Batch Payments" id="menu_batch_payment_sales" parent="account.menu_finance_receivables" sequence="18" groups="account.group_account_readonly"/>
|
|
<menuitem action="action_batch_payment_out" name="Batch Payments" id="menu_batch_payment_purchases" parent="account.menu_finance_payables" sequence="21" groups="account.group_account_readonly"/>
|
|
|
|
</odoo>
|