Newer
Older
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Copyright 2020 Le Filament
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<data>
<record id="account_payment_order_form" model="ir.ui.view">
<field name="name">account.payment.order.form</field>
<field name="model">account.payment.order</field>
<field
name="inherit_id"
ref="account_payment_order.account_payment_order_form"
/>
<field name="priority">100</field>
<field name="arch" type="xml">
<!-- Header and buttons -->
<xpath expr="//button[@name='action_cancel']" position="after">
<button
name="action_send_email"
type="object"
string="Envoyer un email aux coopératives"
class="btn-info"
groups="base.group_system"
attrs="{'invisible': ['|', ('state', 'not in', ('generated', 'uploaded')), ('email_sent', '=', True)]}"
confirm="Valider l'envoi des emails ?"
/>
<button
name="action_send_email"
type="object"
string="Renvoyer un email aux coopératives"
groups="base.group_system"
attrs="{'invisible': ['|', ('state', 'not in', ('generated', 'uploaded')), ('email_sent', '!=', True)]}"
confirm="Valider l'envoi des emails ?"
/>
</xpath>
<xpath expr="//button[@name='action_cancel']" position="attributes">
<attribute
name="groups"
>base.group_system,cgscop_partner.group_cg_administrator</attribute>
<attribute
name="confirm"
>Confirmer l'annulation de l'ordre de prélèvement ?</attribute>
</xpath>
<xpath
expr="//button[@name='action_uploaded_cancel']"
position="attributes"
>
<attribute
name="groups"
>base.group_system,cgscop_partner.group_cg_administrator</attribute>
<attribute
name="confirm"
>Confirmer l'annulation de l'ordre de prélèvement ?</attribute>
</xpath>
<!-- Sheet -->
<!-- Button box -->
<xpath expr="//div[@name='button_box']" position="inside">
<button
class="oe_stat_button"
name="action_show_emails"
type="object"
icon="fa-envelope-o"
>
<field string="Emails" name="email_count" widget="statinfo" />
</button>
</xpath>
<!-- Alert -->
<xpath expr="//div[hasclass('oe_title')]" position="before">
<field name="email_sent" invisible="1" />
<div
class="alert alert-warning"
role="alert"
attrs="{'invisible': [('email_sent', '!=', True)]}"
>
Un email a été envoyé aux coopératives le
<field name="email_datetime" readonly="1" />
</div>
</xpath>
<!-- Sheet Buttons -->

Benjamin - Le Filament
committed
<xpath expr="//field[@name='bank_line_count']" position="after">
<field name="payment_line_amount" />
<field name="bank_line_amount" />
<button
name="view_payment_line"
type="object"
string="Modifier les lignes de paiement"
attrs="{'invisible': [('state', '!=', 'draft')]}"
/>

Benjamin - Le Filament
committed
</xpath>
<xpath expr="//field[@name='description']" position="after">
<button
name="view_account_move"
type="object"
string="Gérer les rejets de prélèvement"
class="btn-info"
attrs="{'invisible': [('state', 'not in', ('uploaded', 'done'))]}"
/>
<!-- Boutons de vérification IBAN et mandats -->
<xpath expr="//notebook" position="before">
<field name="mandate_validity" invisible="1" />
<button
name="view_wrong_iban"
type="object"
string="Voir les IBAN à corriger"
class="btn-danger"
attrs="{'invisible': [('sepa', '=', True)]}"
style="margin-right: 10px;"
<button
name="view_wrong_mandate"
type="object"
string="Voir les Mandats non valides"
class="btn-danger"
attrs="{'invisible': [('mandate_validity', '=', True)]}"
/>
</xpath>
<!-- Affichage des fichers XML -->
<xpath expr="//notebook" position="inside">
<page name="attachments" string="Fichiers de prélèvements">
<field name="attachment_ids">
<tree>
<field name="create_date" />
<field name="name" />
<field name="type" />
<field name="datas" filename="datas_fname" />
<field name="create_uid" />
</tree>
<form>
<h1><field name="name" /></h1>
<group>
<group>
<field
name="datas"
filename="name"
attrs="{'invisible':[('type','=','url')]}"
string="Télécharger le fichier"
/>
<field
name="name"
invisible="1"
attrs="{'invisible':[('type','=','url')]}"
class="oe_inline oe_right"
/>
<field
name="url"
widget="url"
attrs="{'invisible':[('type','=','binary')]}"
/>
<field
name="mimetype"
groups="base.group_no_one"
/>
<field name="type" />
</group>
<group>
<field name="create_uid" />
<field name="create_date" />
</group>
</group>
</form>
</field>
</page>
</xpath>
</field>
</record>
</data>