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

« back to all changes in this revision

Viewing changes to purchase/test/purchase_from_picking.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:
28
28
-
29
29
  !record {model: purchase.order, id: purchase_order_po2}:
30
30
    company_id: base.main_company
31
 
    date_order: '2010-05-11'
 
31
    date_order: !eval time.strftime('%Y-%m-%d')
32
32
    invoice_method: picking
33
33
    location_id: stock.stock_location_stock
34
34
    order_line:
35
 
      - date_planned: '2010-05-13'
 
35
      - date_planned: !eval time.strftime('%Y-%m-%d')
36
36
        name: iPod
37
37
        price_unit: 100.0
38
38
        product_id: 'product_product_ipod0'
132
132
  Then I create an invoice from picking by clicking on "Create Invoice" wizard
133
133
-
134
134
  !python {model: stock.invoice.onshipping}: |
 
135
    import time
135
136
    pur_obj=self.pool.get('purchase.order')
136
137
    pur_id1=pur_obj.browse(cr, uid, ref("purchase_order_po2"))
137
138
    pick_ids = [x.id for x in pur_id1.picking_ids]
138
 
    id = self.create(cr, uid, {'invoice_date': '2010-05-11', 'journal_id': ref('account.expenses_journal')},
 
139
    id = self.create(cr, uid, {'invoice_date': time.strftime('%Y-%m-%d'), 'journal_id': ref('account.expenses_journal')},
139
140
      {'active_ids': pick_ids})
140
141
    self.create_invoice(cr, uid, [id], {"active_ids": pick_ids, "active_id": pick_ids[0]})
141
142
-