Files
bank-payment/account_banking_mandate/views/account_banking_mandate_view.xml
2021-01-08 08:36:28 +01:00

213 lines
8.6 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<!--
© 2013-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="view_mandate_form" model="ir.ui.view">
<field name="name">view.mandate.form</field>
<field name="model">account.banking.mandate</field>
<field name="arch" type="xml">
<form string="Banking Mandate">
<header>
<button
name="validate"
type="object"
string="Validate"
states="draft"
class="oe_highlight"
invisible="context.get('mandate_bank_partner_view')"
/>
<button
name="cancel"
type="object"
string="Cancel"
states="draft,valid"
invisible="context.get('mandate_bank_partner_view')"
/>
<button
name="back2draft"
type="object"
string="Back to Draft"
states="cancel"
groups="account.group_account_manager"
confirm="You should set a mandate back to draft only if you cancelled it by mistake. Do you want to continue?"
invisible="context.get('mandate_bank_partner_view')"
/>
<field name="state" widget="statusbar" />
</header>
<sheet>
<div class="oe_button_box" name="button_box" />
<div class="oe_title">
<h1>
<field
name="unique_mandate_reference"
class="oe_inline"
readonly="1"
/>
</h1>
</div>
<group name="main">
<field name="company_id" groups="base.group_multi_company" />
<field name="format" string="Format" />
<field name="type" string="Type" />
<field
name="partner_bank_id"
options="{'create_name_field': 'acc_number'}"
invisible="context.get('mandate_bank_partner_view')"
/>
<field
name="partner_id"
invisible="context.get('mandate_bank_partner_view')"
readonly="True"
/>
<field name="signature_date" />
<field name="scan" />
<field name="last_debit_date" />
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" />
<field name="message_ids" widget="mail_thread" />
</div>
</form>
</field>
</record>
<record id="views_mandate_form_buttons" model="ir.ui.view">
<field name="name">view.mandate.form.buttons</field>
<field name="model">account.banking.mandate</field>
<field name="inherit_id" ref="account_banking_mandate.view_mandate_form" />
<field
name="groups_id"
eval="[(6, 0, [ref('account_payment_order.group_account_payment')])]"
/>
<field name="arch" type="xml">
<div name="button_box" position="inside">
<button
name="show_payment_lines"
help="Payment lines"
class="oe_stat_button"
icon="fa-list"
type="object"
>
<field
name="payment_line_ids_count"
widget="statinfo"
string="Payment lines"
/>
</button>
</div>
</field>
</record>
<record id="view_mandate_tree" model="ir.ui.view">
<field name="name">view.mandate.tree</field>
<field name="model">account.banking.mandate</field>
<field name="arch" type="xml">
<tree
string="Banking Mandate"
decoration-info="state=='draft'"
decoration-muted="state in ('expired','cancel')"
>
<field name="id" invisible="1" />
<field name="company_id" groups="base.group_multi_company" />
<field
name="partner_id"
invisible="context.get('mandate_bank_partner_view')"
/>
<field name="format" string="Format" />
<field name="unique_mandate_reference" string="Reference" />
<field name="signature_date" string="Signature Date" />
<field name="last_debit_date" />
<button
name="validate"
type="object"
icon="fa-check"
string="Validate"
attrs="{'invisible': ['|', ('id', '=', False), ('state', '!=', 'draft')]}"
/>
<button
name="cancel"
type="object"
icon="fa-times"
string="Cancel"
attrs="{'invisible': ['|', ('id', '=', False), ('state', '=', 'cancel')]}"
/>
<button
name="back2draft"
type="object"
icon="fa-undo"
string="Draft"
groups="account.group_account_manager"
attrs="{'invisible': ['|', ('id', '=', False), ('state', '!=', 'cancel')]}"
/>
<field name="state" />
</tree>
</field>
</record>
<record id="view_mandate_search" model="ir.ui.view">
<field name="name">view.mandate.search</field>
<field name="model">account.banking.mandate</field>
<field name="arch" type="xml">
<search string="Search Banking Mandates">
<field
name="unique_mandate_reference"
string="Reference or Partner"
filter_domain="['|', ('unique_mandate_reference', 'ilike', self), ('partner_id', 'ilike', self)]"
/>
<field name="partner_id" />
<filter
name="draft"
string="Draft"
domain="[('state', '=', 'draft')]"
/>
<filter
name="valid"
string="Valid"
domain="[('state', '=', 'valid')]"
/>
<filter
name="cancel"
string="Cancelled"
domain="[('state', '=', 'cancel')]"
/>
<filter
name="expired"
string="Expired"
domain="[('state', '=', 'expired')]"
/>
<group string="Group By" name="groupby">
<filter
name="state_groupby"
string="State"
context="{'group_by': 'state'}"
/>
<filter
name="signature_date_groupby"
string="Signature Date"
context="{'group_by': 'signature_date'}"
/>
</group>
</search>
</field>
</record>
<record id="mandate_action" model="ir.actions.act_window">
<field name="name">Banking Mandates</field>
<field name="res_model">account.banking.mandate</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a new Banking Mandate.
</p>
<p>
A Banking Mandate is a document signed by your customer that gives you the autorization to do one or several operations on his bank account.
</p>
</field>
</record>
<menuitem
id="mandate_menu"
parent="account.menu_finance_receivables"
action="mandate_action"
sequence="50"
/>
</odoo>