~s-chazallet/sale-wkfl/7.0

« back to all changes in this revision

Viewing changes to sale_delivery_term/test/sale_order_demo.yml

  • Committer: Alexandre Fayolle
  • Author(s): lorenzo.battistini at agilebg
  • Date: 2013-03-18 11:27:13 UTC
  • mfrom: (9.1.13 adding_sale_delivery_term_7)
  • Revision ID: alexandre.fayolle@camptocamp.com-20130318112713-cnvkpv6ls5c7w31r
[MRG] add sale_multi_picking and sale_delivery_term addons

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-
 
2
  In order to test process of the Sale Order, I create sale order
 
3
-
 
4
  !record {model: sale.order, id: sale_order_test1}:
 
5
    partner_id: base.res_partner_2
 
6
    note: Invoice after delivery
 
7
    payment_term: account.account_payment_term
 
8
    master_order_line: 
 
9
      - product_id: product.product_product_7
 
10
        product_uom_qty: 8
 
11
        delivery_term_id: sale_delivery_term_1
 
12
-
 
13
  I verify that the onchange was correctly triggered
 
14
-
 
15
  !assert {model: sale.order, id: sale_order_test1, string: The onchange function of product was not correctly triggered}:
 
16
    - master_order_line[0].name == u'[LCD17] 17\u201d LCD Monitor'
 
17
    - master_order_line[0].price_unit == 1350.0
 
18
    - master_order_line[0].product_uom_qty == 8
 
19
    - master_order_line[0].product_uom.id == ref('product.product_uom_unit')
 
20
 
 
21
-
 
22
  I create another sale order
 
23
-
 
24
  !record {model: sale.order, id: sale_order_test2}:
 
25
    partner_id: base.res_partner_2
 
26
    master_order_line: 
 
27
      - product_id: product.product_product_7
 
28
        product_uom_qty: 16
 
29
        product_uom: product.product_uom_dozen
 
30
        delivery_term_id: sale_delivery_term_1
 
31
-
 
32
  I verify that the onchange was correctly triggered
 
33
-
 
34
  !assert {model: sale.order, id: sale_order_test2, string: The onchange function of product was not correctly triggered}:
 
35
    - master_order_line[0].name == u'[LCD17] 17\u201d LCD Monitor'
 
36
    - master_order_line[0].price_unit == 1350.0 * 12
 
37
    - master_order_line[0].product_uom.id == ref('product.product_uom_dozen')
 
38
    - master_order_line[0].product_uom_qty == 16
 
39
 
 
40
-
 
41
  I create the detailed order lines
 
42
-
 
43
   !python {model: sale.order}: |
 
44
     for line in self.browse(cr, uid, ref('sale_order_test2')).master_order_line:
 
45
       line.generate_detailed_lines()
 
46
 
 
47
-
 
48
  I confirm the Quotation
 
49
-
 
50
  !workflow {model: sale.order, action: order_confirm, ref: sale_order_test2}