2018-02-02 13:58:36 +01:00
|
|
|
<?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">
|
2018-02-02 16:27:45 +01:00
|
|
|
<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" />
|
2018-02-02 13:58:36 +01:00
|
|
|
</field>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2018-02-02 18:29:10 +01:00
|
|
|
<!-- 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">
|
2018-02-06 10:38:18 +01:00
|
|
|
<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>
|
2018-02-02 18:29:10 +01:00
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2018-02-02 18:08:16 +01:00
|
|
|
<!-- 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>
|
2018-08-03 09:49:54 +02:00
|
|
|
<field name="partner_id" />
|
2018-02-06 10:38:18 +01:00
|
|
|
<field name="state" />
|
2018-02-02 18:08:16 +01:00
|
|
|
<field name="payment_date" />
|
2018-02-02 18:29:10 +01:00
|
|
|
<field name="reference" />
|
2018-08-03 09:49:54 +02:00
|
|
|
<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 />
|
2018-02-05 15:56:52 +01:00
|
|
|
<filter name="payment_7_days" string="payment in 7 days"
|
2018-02-05 17:02:55 +01:00
|
|
|
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'))]" />
|
2018-02-06 10:38:18 +01:00
|
|
|
<separator />
|
|
|
|
<filter name="payment_delayed" string="Payment delayed"
|
|
|
|
domain="[('state','=', 'draft'), ('payment_date','<=', context_today().strftime('%Y-%m-%d'))]" />
|
2018-08-03 09:49:54 +02:00
|
|
|
<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>
|
2018-02-02 18:08:16 +01:00
|
|
|
</search>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2018-02-02 13:58:36 +01:00
|
|
|
</data>
|
|
|
|
</odoo>
|