[FIX] purchase: remove extra filter domain

Steps to reproduce the bug:
- create a new product “p1”
- Create a purchase order with “P1” → confirm it
- Click on “Purchase history”

Problem:
No purchase order is displayed for this product, whereas we have a
confirmed PO.

Because the partner id is formatted as a string and added to the domain,
so when the `web_search_read` function is executed, it will return an
empty result because the id is supposed to be a number instead of a
string: https://github .com/odoo/odoo/blob/master/addons/web/models/models.py#L62

Solution:
The filter on the vendor can be removed because it's already added when
calling the action: https://github.com/odoo/odoo/blob/678bc958fafd5502a61ce54069b13160ad37d2d4/addons/purchase/models/purchase.py# L1240

opw-2976152

closes odoo/odoo#100892

X-original-commit: 9431adc5bfce525bd3a9ec4c3f7215f2ee312841
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
This commit is contained in:
Touati Djamel (otd)
2022-09-23 09:21:35 +02:00
committed by Arnold Moyaux
parent 252687de19
commit bc6c8255a9
+1 -1
View File
@@ -764,7 +764,7 @@
<search string="Search Purchase Order">
<field name="order_id"/>
<field name="product_id"/>
<field name="partner_id" string="Vendor" filter_domain="[('partner_id', 'child_of', self)]"/>
<field name="partner_id" string="Vendor"/>
<filter name="hide_cancelled" string="Hide cancelled lines" domain="[('state', '!=', 'cancel')]"/>
<group expand="0" string="Group By">
<filter name="groupby_supplier" string="Vendor" domain="[]" context="{'group_by' : 'partner_id'}" />