~julius-network-solutions/openobject-addons/trunk-bug-wiki-image

« back to all changes in this revision

Viewing changes to sale/test/invoice_on_shipped_qty.yml

  • Committer: qdp-launchpad at tinyerp
  • Date: 2011-01-14 00:11:01 UTC
  • mfrom: (3164.118.723 dev-3addons)
  • Revision ID: qdp-launchpad@tinyerp.com-20110114001101-wk77opsrvslh7pak
Tags: openerp-buildfail-1-5165
[MERGE] merged the dev3 branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
  I create a Sale Order for Slider Mobile for 200 quantity having Shipping Policy 'Invoice from Picking' and Invoice on 'Shipped quantities'
4
4
-
5
5
  !record {model: sale.order, id: sale_order_so6}:
6
 
    date_order: '2010-07-17'
 
6
    date_order: !eval time.strftime('%Y-%m-%d')
7
7
    invoice_quantity: order
8
8
    name: Test_SO006BIS
9
9
    order_line:
25
25
    picking_policy: direct
26
26
    pricelist_id: product.list0
27
27
    shop_id: sale.shop
28
 
 
28
-
29
29
  I confirm the Sale Order.
30
 
 
30
-
31
31
  !workflow {model: sale.order, action: order_confirm, ref: sale_order_so6}
32
32
-
33
33
  I verify that the picking has been generated for the sale order
34
 
 
34
-
35
35
  !python {model: sale.order}: |
36
36
    so = self.browse(cr, uid, ref("sale_order_so6"))
37
37
    assert so.picking_ids,"Picking has not been generated for sale_order_so6"
39
39
  Then I click on the "Product Sent" button of Outgoing Shipments
40
40
-
41
41
  !record {model: stock.partial.picking, id: stock_partial_picking_0}:
42
 
    date: '2010-07-17 17:52:09'
43
 
-    
 
42
    date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
 
43
-
44
44
  I change the quantity on the picking to 199, and confirm partially 100 PCE.
45
 
 
45
-
46
46
  !python {model: stock.picking }: |
47
47
    import time
48
48
    sale_order_obj = self.pool.get('sale.order')
69
69
  Then I click on 'Create Invoices' button
70
70
-
71
71
  !python {model: stock.invoice.onshipping}: |
72
 
    sale_obj = self.pool.get('sale.order')  
 
72
    import time
 
73
    sale_obj = self.pool.get('sale.order')
73
74
    sale_id = sale_obj.browse(cr, uid, ref("sale_order_so6"))
74
75
    ids = [x.id for x in sale_id.picking_ids]
75
 
    wiz_id = self.create(cr, uid, {'invoice_date': '2010-07-17', 'journal_id': ref('account.sales_journal')},
 
76
    wiz_id = self.create(cr, uid, {'invoice_date': time.strftime('%Y-%m-%d'), 'journal_id': ref('account.sales_journal')},
76
77
      {'active_ids': ids})
77
78
    self.create_invoice(cr, uid, [wiz_id], {"active_ids": ids, "active_id": ids[0]})
78
79
-
98
99
    for inv_lines in inv_brw.invoice_line:
99
100
        qty1=inv_lines.quantity
100
101
    assert (qty1 == qty), "Quantities are not the same"
101
 
-    
 
102
-
102
103
  I open the Invoice for the SO.
103
104
-
104
105
  !python {model: account.invoice}: |
111
112
      wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
112
113
-
113
114
  Assign analytic journal into bank journal
114
 
 
115
-
115
116
  !record {model: account.journal, id: sale.account_journal_bankjournal0}:
116
117
    analytic_journal_id: account.cose_journal_sale
117
118
-
127
128
        ref('account.period_8'), ref('sale.account_journal_bankjournal0'),
128
129
        name='test')
129
130
-
130
 
  I verify the invoice are in paid state or not. 
 
131
  I verify the invoice are in paid state or not.
131
132
-
132
133
  !python {model: account.invoice}: |
133
134
    sale_order_obj = self.pool.get('sale.order')