102 lines
4.2 KiB
XML
102 lines
4.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<!--
|
|
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
-->
|
|
|
|
<odoo>
|
|
<data>
|
|
<!-- Forms -->
|
|
<record model="ir.ui.view" id="account_payment_form_inherit_golem_payment">
|
|
<field name="name">Add number of bank check into main form</field>
|
|
<field name="model">account.payment</field>
|
|
<field name="inherit_id" ref="account.view_account_payment_form" />
|
|
<field name="arch" type="xml">
|
|
<field name="communication" position="before">
|
|
<field name="reference" />
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="account_invoice_form_inherit_golem_payment">
|
|
<field name="name">Add number of bank check into main form</field>
|
|
<field name="model">account.payment</field>
|
|
<field name="inherit_id" ref="account.view_account_payment_invoice_form" />
|
|
<field name="arch" type="xml">
|
|
<field name="communication" position="before">
|
|
<field name="reference" />
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Trees -->
|
|
<record id="golem_payment_tree_inherit_account_payment" model="ir.ui.view">
|
|
<field name="name">Account payment list</field>
|
|
<field name="model">account.payment</field>
|
|
<field name="inherit_id" ref="account.view_account_payment_tree" />
|
|
<field name="arch" type="xml">
|
|
<tree position="attributes">
|
|
<attribute name="decoration-warning">state=='draft' and payment_date <= current_date</attribute>
|
|
</tree>
|
|
<field name="state" position="before" >
|
|
<field name="reference" />
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Search -->
|
|
<record id="account_payment_search" model="ir.ui.view">
|
|
<field name="name">Account Payment Filters</field>
|
|
<field name="model">account.payment</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="partner_id" />
|
|
<field name="state" />
|
|
<field name="payment_date" />
|
|
<field name="reference" />
|
|
<filter name="state_draft" string="Draft"
|
|
domain="[('state', '=', 'draft')]" />
|
|
<filter name="state_posted" string="Post"
|
|
domain="[('state', '=', 'posted')]" />
|
|
<filter name="state_sent" string="Sent"
|
|
domain="[('state', '=', 'sent')]" />
|
|
<filter name="state_reconciled" string="Reconciled"
|
|
domain="[('state', '=', 'reconciled')]" />
|
|
<separator />
|
|
<filter name="payment_7_days" string="payment in 7 days"
|
|
domain="[('state','=', 'draft'),
|
|
('payment_date','<=', (context_today() + datetime.timedelta(days=7)).strftime('%Y-%m-%d')),
|
|
('payment_date','>=', context_today().strftime('%Y-%m-%d'))]" />
|
|
<filter name="payment_30_days" string="payment in 30 days"
|
|
domain="[('state','=', 'draft'),
|
|
('payment_date','<=', (context_today() + datetime.timedelta(days=30)).strftime('%Y-%m-%d')),
|
|
('payment_date','>=', context_today().strftime('%Y-%m-%d'))]" />
|
|
<separator />
|
|
<filter name="payment_delayed" string="Payment delayed"
|
|
domain="[('state','=', 'draft'), ('payment_date','<=', context_today().strftime('%Y-%m-%d'))]" />
|
|
<group string="Group By">
|
|
<filter name="group_week" string="By week"
|
|
context="{'group_by': 'payment_date:week'}"/>
|
|
<filter name="group_month" string="By month"
|
|
context="{'group_by': 'payment_date:month'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo>
|