[FIX] product: display pricelists that have no defined end date

Steps to reproduce the bug:
- Go to purchase > Configuration > Vendor Pricelists
- Filters > select the “Active” filter

Problem:
Currently, the filter does not include records that do not have a specified `”date_end”`, even though they are considered active.

Opw-2659829

closes odoo/odoo#78643

X-original-commit: bb8bef5cff3b67e42218469e898f2b95e4ab315d
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
This commit is contained in:
Touati Djamel (otd)
2021-10-20 09:12:30 +00:00
parent 50269168ce
commit dae7fb01f5
+1 -1
View File
@@ -640,7 +640,7 @@
<search string="Vendor">
<field name="name"/>
<field name="product_tmpl_id"/>
<filter string="Active" name="active" domain="[('date_end', '&gt;=', (context_today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d'))]"/>
<filter string="Active" name="active" domain="['|', ('date_end', '=', False), ('date_end', '&gt;=', (context_today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d'))]"/>
<filter string="Archived" name="archived" domain="[('date_end', '&lt;', (context_today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d'))]"/>
<group expand="0" string="Group By">
<filter string="Product" name="groupby_product" domain="[]" context="{'group_by': 'product_tmpl_id'}"/>