[IMP]: Procurement yml
bzr revid: ksa@tinyerp.co.in-20110120100659-pnjeuf2105l7768h
This commit is contained in:
parent
be7fca6a2b
commit
954b00ab6c
|
@ -46,6 +46,7 @@
|
|||
'board_mrp_procurement_view.xml',
|
||||
],
|
||||
'demo_xml': ['stock_orderpoint.xml'],
|
||||
'test': ['test/procurement_test.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '00954248826881074509',
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
-
|
||||
In order to test the Procurement flow,I start by creating a new product 'Apple'
|
||||
-
|
||||
!record {model: product.product, id: product_product_apple0}:
|
||||
categ_id: product.cat1
|
||||
name: Apple
|
||||
procure_method: make_to_stock
|
||||
seller_ids:
|
||||
- delay: 1
|
||||
name: base.res_partner_asus
|
||||
min_qty: 1.0
|
||||
product_uom: product.product_uom_kgm
|
||||
supply_method: buy
|
||||
type: product
|
||||
uom_id: product.product_uom_kgm
|
||||
uom_po_id: product.product_uom_kgm
|
||||
property_stock_inventory: stock.location_inventory
|
||||
property_stock_procurement: stock.location_procurement
|
||||
property_stock_production: stock.location_production
|
||||
-
|
||||
I define Minimum stock rules for my stockable product "Apple".
|
||||
-
|
||||
!record {model: stock.warehouse.orderpoint, id: stock_warehouse_orderpoint_op0}:
|
||||
company_id: base.main_company
|
||||
location_id: stock.stock_location_stock
|
||||
logic: max
|
||||
name: OP/00002
|
||||
product_id: product_product_apple0
|
||||
product_max_qty: 10.0
|
||||
product_min_qty: 5.0
|
||||
product_uom: product.product_uom_kgm
|
||||
qty_multiple: 1
|
||||
warehouse_id: stock.warehouse0
|
||||
-
|
||||
The scheduler runs.
|
||||
-
|
||||
!function {model: procurement.order, name: run_scheduler}:
|
||||
- model: procurement.order
|
||||
search: "[]"
|
||||
-
|
||||
I also check that there are procurement order for Apple or not.
|
||||
-
|
||||
!python {model: procurement.order}: |
|
||||
proc_ids = self.search(cr, uid, [('product_id','in',[ref('product_product_apple0')])])
|
||||
assert proc_ids, 'No Procurements.'
|
||||
-
|
||||
Apply Request for Procurement clicking on "Procurement Request" From Product.
|
||||
-
|
||||
!record {model: make.procurement, id: procurement_order_apple0}:
|
||||
product_id: product_product_apple0
|
||||
qty: 10.0
|
||||
date_planned: '2010-04-20'
|
||||
uom_id: product.product_uom_kgm
|
||||
warehouse_id: stock.warehouse0
|
||||
-
|
||||
Create procurement order for selected product.
|
||||
-
|
||||
!python {model: make.procurement}: |
|
||||
self.make_procurement(cr, uid, [ref('procurement_order_apple0')], context={'active_id': ref('product_product_apple0')})
|
||||
|
Loading…
Reference in New Issue