~camptocamp/purchase-wkfl/7.0-browse_record_error-1287159

« back to all changes in this revision

Viewing changes to purchase_order_revision/test/purchase_order.yml

  • Committer: Lorenzo Battistini
  • Date: 2013-07-24 09:37:08 UTC
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: lorenzo.battistini@agilebg.com-20130724093708-rdw6tkmieoqnk4in
[add] draft tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-
 
2
  I create a PO
 
3
-
 
4
  !record {model: purchase.order, id: purchase_order_1}:
 
5
    partner_id: base.res_partner_1
 
6
    invoice_method: order
 
7
    order_line:
 
8
      - product_id: product.product_product_15
 
9
        price_unit: 79.80
 
10
        product_qty: 15.0
 
11
      - product_id: product.product_product_25
 
12
        price_unit: 2868.70
 
13
        product_qty: 5.0
 
14
      - product_id: product.product_product_27
 
15
        price_unit: 3297.20
 
16
        product_qty: 4.0
 
17
-
 
18
  I cancel the PO
 
19
-
 
20
   !python {model: purchase.order}: |
 
21
     self.action_cancel(cr, uid, [ref('purchase_order_1')])
 
22
-
 
23
  I create a new revision
 
24
-
 
25
   !python {model: purchase.order}: |
 
26
     action = self.new_revision(cr, uid, [ref('purchase_order_1')])
 
27
     old_po = self.browse(cr, uid, ref('purchase_order_1'))
 
28
     new_po = self.browse(cr, uid, action['res_id'])
 
29
     assert new_po.old_revision_ids[0].id == old_po.id, "Old revision not set"