forked from Yaltik/golem
[TMP] Change color if is payment delayed.
This commit is contained in:
parent
68480e421d
commit
edd333f0ae
@ -48,20 +48,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="model">account.payment</field>
|
||||
<field name="inherit_id" ref="account.view_account_payment_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="state" position="before">
|
||||
<field name="reference" />
|
||||
</field>
|
||||
<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="state" />
|
||||
<field name="payment_date" />
|
||||
<field name="reference" />
|
||||
<group string="Group By">
|
||||
@ -78,9 +80,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
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'))]" />
|
||||
<separator />
|
||||
<filter name="payment_delayed" string="Payment delayed"
|
||||
domain="[('state','=', 'draft'), ('payment_date','<=', context_today().strftime('%Y-%m-%d'))]" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
Loading…
x
Reference in New Issue
Block a user