Skip to content
Snippets Groups Projects
Commit d3002116 authored by Daniel Reis's avatar Daniel Reis
Browse files

[FIX] purchase: display POs maching same commercial partner


The "Auto-complete" bills field does not show all POs for the Vendor that are waiting for invoices.

To reproduce the issue:

    - Create PO1 Vendor = "Supplier"
    - Create PO2 Vendor = "Supplier, John Doe"
    - Create Invoice for PO2
    - In the PO2 Invoice, "Auto-Complete" field try to select PO1, but it is not shown.

The "Auto-complete" bills field should show all POs for the Vendor that are waiting for invoices.
The problem is that the field's domain filters is using the partner_id
field when it should be using teh commercial_partner_id.

opw-2684409

closes odoo/odoo#79359

Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
parent 8dfba47a
Branches
Tags
No related merge requests found
......@@ -14,7 +14,7 @@
<field name="purchase_vendor_bill_id" nolabel="1"
attrs="{'invisible': ['|', ('state','!=','draft'), ('move_type', '!=', 'in_invoice')]}"
class="oe_edit_only"
domain="partner_id and [('company_id', '=', company_id), ('partner_id','child_of', [partner_id])] or [('company_id', '=', company_id)]"
domain="partner_id and [('company_id', '=', company_id), ('partner_id.commercial_partner_id', '=', commercial_partner_id)] or [('company_id', '=', company_id)]"
placeholder="Select a purchase order or an old bill"
context="{'show_total_amount': True}"
options="{'no_create': True, 'no_open': True}"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment