[IMP]purchase: Improve the code of merge_purchase_order.yml

bzr revid: dbr@tinyerp.com-20111011063201-88z7w1898jviv7k8
This commit is contained in:
DBR (OpenERP)
2011-10-11 12:02:01 +05:30
parent db7100ce4f
commit 7531b94df6
@@ -25,27 +25,8 @@
-
Initially purchase order is in the draft state.
-
!assert {model: purchase.order, id: purchase_order_po3}:
!assert {model: purchase.order, id: purchase_order_po2}:
- state == 'draft'
-
I create Second purchase order for 'Side Panel' product.
-
!record {model: purchase.order, id: purchase_order_po2}:
company_id: base.main_company
date_order: !eval time.strftime('%Y-%m-%d')
invoice_method: order
location_id: stock.stock_location_stock
order_line:
- date_planned: !eval time.strftime('%Y-%m-%d')
name: Metal Cleats
price_unit: 100.0
product_id: product.product_product_sidepanel0
product_qty: 10.0
product_uom: product.product_uom_unit
state: draft
partner_address_id: base.res_partner_address_7
partner_id: base.res_partner_4
pricelist_id: purchase.list0
-
I test for Copy Purchase order in Draft state.
-
@@ -54,7 +35,7 @@
ids = [ref("purchase_order_po2"),copy_id]
context.update({'active_ids': ids})
-
I have merged first and second purchase order which are in draft state, belong to the same supplier,have same stock location, same pricelist.
I have merged first and second(copied) purchase order which are in draft state, belong to the same supplier,have same stock location, same pricelist.
-
!python {model: purchase.order.group}: |
ids = context.get('active_ids')