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

« back to all changes in this revision

Viewing changes to sale/test/so_make_line_invoice.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 two products LG Viewty Smart and Slider mobile for qty 100 having order_policy manual.
4
4
-
5
5
  !record {model: sale.order, id: sale_order_so3}:
6
 
    date_order: '2010-07-12'
 
6
    date_order: !eval time.strftime('%Y-%m-%d')
7
7
    invoice_quantity: order
8
8
    name: Test_SO003
9
9
    order_line:
27
27
        product_id: sale.product_product_lgviewtysmart0
28
28
        product_uos_qty: 100.0
29
29
        th_weight: 0.0
30
 
        type: make_to_order      
 
30
        type: make_to_order
31
31
    order_policy: manual
32
32
    partner_id: sale.res_partner_cleartrail0
33
33
    partner_invoice_id: sale.res_partner_address_2
36
36
    picking_policy: direct
37
37
    pricelist_id: product.list0
38
38
    shop_id: sale.shop
39
 
 
39
-
40
40
  I confirm the Sale Order.
41
 
 
41
-
42
42
  !workflow {model: sale.order, action: order_confirm, ref: sale_order_so3}
43
43
-
44
44
  I click on the "Make Invoice" button of sale order line
47
47
    {}
48
48
-
49
49
  I click on the "Create Invoice" button of wizard
50
 
 
50
-
51
51
  !python {model: sale.order.line.make.invoice}: |
52
52
    sale_order_obj = self.pool.get('sale.order')
53
53
    so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
54
 
    sol = so.order_line[0] 
 
54
    sol = so.order_line[0]
55
55
    self.make_invoices(cr, uid, [ref("sale_order_line_make_invoice_0")], {"lang": "en_US",
56
56
      "tz": False, "active_model": "sale.order.line", "active_ids": [sol.id],
57
57
      "search_default_uninvoiced": 1, "active_id": sol.id,
61
61
-
62
62
  !python {model: sale.order}: |
63
63
    sale_id=self.browse(cr, uid, ref("sale_order_so3"))
64
 
    sol = sale_id.order_line[0]  
 
64
    sol = sale_id.order_line[0]
65
65
    assert(sol.invoiced == True), "Invoiced has not been set to true"
66
66
-
67
67
  I verify that an invoice for sale order line has been created.
90
90
    assert invoice_id, "Invoice is not in the open state"
91
91
-
92
92
  I assign an analytic journal to the bank journal
93
 
 
93
-
94
94
  !record {model: account.journal, id: sale.account_journal_bankjournal0}:
95
95
    analytic_journal_id: account.cose_journal_sale
96
96
-
106
106
        ref('account.period_8'), ref('sale.account_journal_bankjournal0'),
107
107
        name='test')
108
108
-
109
 
  I verify that an invoice is in done state. 
 
109
  I verify that an invoice is in done state.
110
110
-
111
111
  !python {model: account.invoice}: |
112
112
    sale_order_obj = self.pool.get('sale.order')
123
123
  I create an invoice for another sale order line. I click on the "Make Invoice" button of sale order line
124
124
-
125
125
  !record {model: sale.order.line.make.invoice, id: sale_order_line_make_invoice_1}:
126
 
    {} 
 
126
    {}
127
127
-
128
128
  I click on the "Create Invoice" button of wizard
129
129
-
130
130
  !python {model: sale.order.line.make.invoice}: |
131
131
    sale_order_obj = self.pool.get('sale.order')
132
132
    so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
133
 
    sol = so.order_line[1]    
 
133
    sol = so.order_line[1]
134
134
    self.make_invoices(cr, uid, [ref("sale_order_line_make_invoice_1")], {"lang": "en_US",
135
135
      "tz": False, "active_model": "sale.order.line", "active_ids": [sol.id],
136
136
      "search_default_uninvoiced": 1, "active_id": sol.id,
146
146
-
147
147
  !python {model: sale.order}: |
148
148
    sale_id=self.browse(cr, uid, ref("sale_order_so3"))
149
 
    sol = sale_id.order_line[1]  
 
149
    sol = sale_id.order_line[1]
150
150
    assert(sol.invoiced == True), "Invoiced has not been set to true"
151
151
-
152
152
  I verify that "Paid" has been set to False.
175
175
    assert invoice_id, "Invoice is not in the open state"
176
176
-
177
177
  Assign analytic journal into bank journal
178
 
 
178
-
179
179
  !record {model: account.journal, id: sale.account_journal_bankjournal0}:
180
180
    analytic_journal_id: account.cose_journal_sale
181
181
-
191
191
        ref('account.period_8'), ref('sale.account_journal_bankjournal0'),
192
192
        name='test')
193
193
-
194
 
  I verify the invoice is in done state. 
 
194
  I verify the invoice is in done state.
195
195
-
196
196
  !python {model: account.invoice}: |
197
197
    sale_order_obj = self.pool.get('sale.order')