From b130b35f048c6fbe9dd0ee1b076541e47b5788ad Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Thu, 18 Apr 2019 10:57:39 +0000 Subject: [PATCH] [FIX] purchase: locked purchase orders are billable Before this commit, when the PO was locked: - the button create bill did not appear on the form view - on the invoice form view, the field autocomplete did not mention the PO After this commit, the button create bill is present, and the PO appears in the auto-complete field of the Vendor bill OPW 1970537 closes odoo/odoo#32794 Signed-off-by: Lucas Perais (lpe) --- addons/purchase/report/purchase_bill.py | 2 +- addons/purchase/views/purchase_views.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/purchase/report/purchase_bill.py b/addons/purchase/report/purchase_bill.py index 036309e8e29..009ce1f6ac8 100644 --- a/addons/purchase/report/purchase_bill.py +++ b/addons/purchase/report/purchase_bill.py @@ -37,7 +37,7 @@ class PurchaseBillUnion(models.Model): NULL as vendor_bill_id, id as purchase_order_id FROM purchase_order WHERE - state = 'purchase' AND + state in ('purchase', 'done') AND invoice_status in ('to invoice', 'no') )""") diff --git a/addons/purchase/views/purchase_views.xml b/addons/purchase/views/purchase_views.xml index 4b0303ed937..2289228e8fe 100644 --- a/addons/purchase/views/purchase_views.xml +++ b/addons/purchase/views/purchase_views.xml @@ -135,12 +135,12 @@