Hi,
I would like to display list of overdue invoices inside a tab (notebook/page) but it didn't work.
The problem is the domain statement cannot calculate today value.
I moved the domain to view but it did not work also.
Please help me to resolve this issue. Thank you!
Here is my code
_inherit = 'res.partner'
overdue_invoice_ids = fields.One2many('account.invoice', 'partner_id', 'Overdue Invoices', readonly=True,
domain=[('state', 'in', ['open']), ('type', 'in', ['out_invoice']),
('date_due', '<', fields.Date.context_today)])
<field name="overdue_invoice_ids" nolabel="1">
<tree string="Invoice">
<field name="date_invoice"/>
<field name="number"/>
<field name="commercial_partner_id" invisible="1"/>
<field name="reference" invisible="1"/>
<field name="name" invisible="1"/>
<field name="date_due"/>
<field name="origin"/>
<field name="amount_untaxed" string="Tax Excluded" sum="Total"/>
<field name="amount_tax" sum="Total"/>
<field name="amount_total_signed" string="Total" sum="Total"/>
<field name="residual_signed" string="Amount Due" sum="Amount Due"/>
<field name="currency_id" invisible="1"/>
<field name="company_currency_id" invisible="1"/>
<field name="state"/>
<field name="type" invisible="context.get('type',True)"/>
</tree>
</field>