~openerp-dev/openobject-addons/new_account_menu_structure

« back to all changes in this revision

Viewing changes to sale/test/sale_procurement.yml

  • Committer: pap(openerp)
  • Date: 2010-06-16 13:35:15 UTC
  • mfrom: (3604.1.29 trunk-dev-addons3)
  • Revision ID: pap@tinyerp.co.in-20100616133515-j2t05tg2m350t0ub
[Merge]

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
  In order to test the sale order working with procurements I will create some
3
3
  products with different supply method and procurement method.
4
4
-
5
 
  I create two products.
6
 
-
7
 
  I create one product Table.
 
5
  I create one product Table as MTO.
8
6
-
9
7
  !record {model: product.product, id: product_product_table0}:
10
8
    categ_id: product.cat1
15
13
    uom_id: product.product_uom_unit
16
14
    uom_po_id: product.product_uom_unit
17
15
-
18
 
  I create another product Wood.
 
16
  I create another product Wood as MTS.
19
17
-
20
18
  !record {model: product.product, id: product_product_wood0}:
21
19
    categ_id: product.cat1
26
24
    uom_id: product.product_uom_kgm
27
25
    uom_po_id: product.product_uom_kgm
28
26
-
29
 
  I define Minimum stock rule for my stockable product wood
 
27
  I define Minimum stock rule for my stockable product Wood (qty between 10 and 15)
30
28
31
29
  !record {model: stock.warehouse.orderpoint, id: stock_warehouse_orderpoint_op0}:
32
30
    company_id: base.main_company
77
75
    proc_ids = self.search(cr, uid, [('state','=','confirmed')])
78
76
    assert proc_ids, _('No Procurements!')
79
77
80
 
  The scheduler runs.
 
78
  I run the scheduler.
81
79
-
82
80
  !function {model: procurement.order, name: run_scheduler}:
83
81
    - model: procurement.order
84
82
      search: "[('state','=','confirmed')]"
85
83
-
86
84
  I check that the procurement for the product table is in exception state.
87
 
  As my product's supply method is produce and mrp module is yet not installed.
 
85
  As my product's supply method is produce and the BoM is not defined.
88
86
-
89
87
  !python {model: procurement.order}: |
90
88
    from tools.translate import _
91
 
    proc_ids = self.search(cr, uid, [('state','=','exception')])
92
 
    assert proc_ids, _('No Procurements are in exception state!')
93
 
  
94
 
  
95
 
  
 
 
b'\\ No newline at end of file'
 
89
    proc_ids = self.search(cr, uid, [('state','=','exception'),('product_id','=',ref('sale.product_product_table0'))])
 
90
    assert proc_ids, _('No Procurements are in exception state for the table!')