[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="model">account.payment</field>
|
||||||
<field name="inherit_id" ref="account.view_account_payment_tree" />
|
<field name="inherit_id" ref="account.view_account_payment_tree" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="state" position="before">
|
<tree position="attributes">
|
||||||
<field name="reference" />
|
<attribute name="decoration-warning">state=='draft' and payment_date <= current_date</attribute>
|
||||||
</field>
|
</tree>
|
||||||
|
<field name="state" position="before" >
|
||||||
|
<field name="reference" />
|
||||||
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Search -->
|
<!-- Search -->
|
||||||
<record id="account_payment_search" model="ir.ui.view">
|
<record id="account_payment_search" model="ir.ui.view">
|
||||||
<field name="name">Account Payment Filters</field>
|
<field name="name">Account Payment Filters</field>
|
||||||
<field name="model">account.payment</field>
|
<field name="model">account.payment</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search>
|
<search>
|
||||||
|
<field name="state" />
|
||||||
<field name="payment_date" />
|
<field name="payment_date" />
|
||||||
<field name="reference" />
|
<field name="reference" />
|
||||||
<group string="Group By">
|
<group string="Group By">
|
||||||
@ -78,9 +80,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
domain="[('state','=', 'draft'),
|
domain="[('state','=', 'draft'),
|
||||||
('payment_date','<=', (context_today() + datetime.timedelta(days=30)).strftime('%Y-%m-%d')),
|
('payment_date','<=', (context_today() + datetime.timedelta(days=30)).strftime('%Y-%m-%d')),
|
||||||
('payment_date','>=', context_today().strftime('%Y-%m-%d'))]" />
|
('payment_date','>=', context_today().strftime('%Y-%m-%d'))]" />
|
||||||
<separator />
|
<separator />
|
||||||
<filter name="payment_delayed" string="Payment delayed"
|
<filter name="payment_delayed" string="Payment delayed"
|
||||||
domain="[('state','=', 'draft'), ('payment_date','>=', context_today().strftime('%Y-%m-%d'))]" />
|
domain="[('state','=', 'draft'), ('payment_date','<=', context_today().strftime('%Y-%m-%d'))]" />
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user