From 427bc19f55271ccd02d3c308ad9f974708697059 Mon Sep 17 00:00:00 2001 From: Laetitia Gangloff Date: Wed, 5 Aug 2015 17:00:34 +0200 Subject: [PATCH] create purchase order from view --- purchase_packaging/models/purchase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purchase_packaging/models/purchase.py b/purchase_packaging/models/purchase.py index 5a981cfca..23b4fb10a 100644 --- a/purchase_packaging/models/purchase.py +++ b/purchase_packaging/models/purchase.py @@ -152,7 +152,7 @@ class PurchaseOrderLine(models.Model): fiscal_position_id=fiscal_position_id, date_planned=date_planned, name=name, price_unit=price_unit, state=state, context=context) - if not qty: + if product_id and partner_id and not qty: res['value']['product_purchase_qty'] = product_purchase_qty res['value']['product_purchase_uom_id'] = product_purchase_uom_id uom_obj = self.pool['product.uom']