diff --git a/addons/purchase/purchase_unit_test.xml b/addons/purchase/purchase_unit_test.xml
index 93c0e42fae2..b35e0626085 100644
--- a/addons/purchase/purchase_unit_test.xml
+++ b/addons/purchase/purchase_unit_test.xml
@@ -41,19 +41,19 @@
-
+
- draft
+ draft
-
+
-
+
@@ -64,7 +64,7 @@
- paid
+ paid
diff --git a/addons/purchase/test/purchase_from_order.yml b/addons/purchase/test/purchase_from_order.yml
index 8c14611661c..454580baaf4 100644
--- a/addons/purchase/test/purchase_from_order.yml
+++ b/addons/purchase/test/purchase_from_order.yml
@@ -133,8 +133,8 @@
-
I check that Traceability moves are created.
-
- I check that an invoice_id field of Delivery&Invoices gets bind with the value.
+ I check that an invoice_ids field of Delivery&Invoices gets bind with the value.
-
!python {model: purchase.order}: |
pur_id2=self.browse(cr, uid, ref("purchase_order_po0"))
- assert(pur_id2.invoice_id)
+ assert(pur_id2.invoice_ids)
diff --git a/addons/purchase/test/purchase_from_picking.yml b/addons/purchase/test/purchase_from_picking.yml
index e68668f408d..357d865b9c9 100644
--- a/addons/purchase/test/purchase_from_picking.yml
+++ b/addons/purchase/test/purchase_from_picking.yml
@@ -139,8 +139,8 @@
{'active_ids': pick_ids})
self.create_invoice(cr, uid, [id], {"active_ids": pick_ids, "active_id": pick_ids[0]})
-
- I check that an invoice_id field of Delivery&Invoices gets bind with the value.
+ I check that an invoice_ids field of Delivery&Invoices gets bind with the value.
-
!python {model: purchase.order}: |
pur_id2=self.browse(cr, uid, ref("purchase_order_po2"))
- assert(pur_id2.invoice_id)
+ assert(pur_id2.invoice_ids)
diff --git a/addons/purchase/wizard/purchase_line_invoice.py b/addons/purchase/wizard/purchase_line_invoice.py
index f22df7aef41..3ff0ee53b6e 100644
--- a/addons/purchase/wizard/purchase_line_invoice.py
+++ b/addons/purchase/wizard/purchase_line_invoice.py
@@ -19,8 +19,6 @@
#
##############################################################################
-import netsvc
-import ir
from osv import osv
from tools.translate import _
@@ -52,7 +50,6 @@ class purchase_line_invoice(osv.osv_memory):
invoices = {}
invoice_obj=self.pool.get('account.invoice')
purchase_line_obj=self.pool.get('purchase.order.line')
- purchase_obj = self.pool.get('purchase.order')
property_obj=self.pool.get('ir.property')
account_fiscal_obj=self.pool.get('account.fiscal.position')
invoice_line_obj=self.pool.get('account.invoice.line')