[FIX] purchase: Use the name of the purchase for the tests and not the id
authorStephane Wirtel <stw@openerp.com>
Thu, 15 Sep 2011 13:41:49 +0000 (15:41 +0200)
committerStephane Wirtel <stw@openerp.com>
Thu, 15 Sep 2011 13:41:49 +0000 (15:41 +0200)
bzr revid: stw@openerp.com-20110915134149-0tv89qadxxgcs6f0

addons/purchase/test/purchase_from_manual.yml
addons/purchase/test/purchase_from_picking.yml

index 2739d74..e46473b 100644 (file)
@@ -98,7 +98,7 @@
     from tools.translate import _
     pur_id1=self.browse(cr, uid, ref("purchase_order_po1"))
     account_obj = self.pool.get('account.invoice')
-    ids = account_obj.search(cr, uid, [('origin', '=', 'PO-'+str(pur_id1.id))])
+    ids = account_obj.search(cr, uid, [('origin', '=', pur_id1.name)])
     assert ids, _('Pending Invoice is not created!')
 -
   I check that the order which was initially in the confirmed state has transit to approved state.
index 94239ba..9425ad9 100644 (file)
@@ -98,7 +98,7 @@
     from tools.translate import _
     pur_id1=self.browse(cr, uid, ref("purchase_order_po2"))
     account_obj = self.pool.get('account.invoice')
-    ids = account_obj.search(cr, uid, [('origin', '=', 'PO-'+str(pur_id1.id))])
+    ids = account_obj.search(cr, uid, [('origin', '=', pur_id1.name)])
     assert ids, _('Pending Invoice is not created!')
 -
  I check that the order which was initially in the confirmed state has transit to approved state.