Merge lp:~donkirkby/openobject-addons/purchase-tests into lp:openobject-addons/5.0

Proposed by Don Kirkby
Status: Merged
Merged at revision: not available
Proposed branch: lp:~donkirkby/openobject-addons/purchase-tests
Merge into: lp:openobject-addons/5.0
Diff against target: 38 lines (+4/-4)
2 files modified
purchase/__terp__.py (+1/-1)
purchase/purchase_unit_test.xml (+3/-3)
To merge this branch: bzr merge lp:~donkirkby/openobject-addons/purchase-tests
Reviewer Review Type Date Requested Status
Olivier Dony (Odoo) Approve
Christophe Simonis (OpenERP) Approve
Review via email: mp+20686@code.launchpad.net

Description of the change

Fixes bug lp:532073 to add the purchase module's unit tests back in. vra gave me a patch to get the tests passing again. I also tweaked the location the a purchase order so that it leaves the demo data in a more logical state.

To post a comment you must log in.
Revision history for this message
Christophe Simonis (OpenERP) (kangol) :
review: Approve
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'purchase/__terp__.py'
2--- purchase/__terp__.py 2009-02-03 17:02:20 +0000
3+++ purchase/__terp__.py 2010-03-04 19:18:21 +0000
4@@ -44,7 +44,7 @@
5 'partner_view.xml',
6 'process/purchase_process.xml'
7 ],
8- 'demo_xml': ['purchase_demo.xml'],
9+ 'demo_xml': ['purchase_demo.xml', 'purchase_unit_test.xml'],
10 'installable': True,
11 'active': False,
12 'certificate': '0057234283549',
13
14=== modified file 'purchase/purchase_unit_test.xml'
15--- purchase/purchase_unit_test.xml 2008-09-10 17:56:00 +0000
16+++ purchase/purchase_unit_test.xml 2010-03-04 19:18:21 +0000
17@@ -28,7 +28,7 @@
18 <field name="pricelist_id" ref="list0"/>
19 <field name="partner_id" search="[]" model="res.partner"/>
20 <field name="partner_address_id" search="[]" model="res.partner.address"/>
21- <field name="location_id" search="[]" model="stock.location"/>
22+ <field name="location_id" ref="stock.stock_location_stock"/>
23 </record>
24 <!-- Resource: purchase.order.line -->
25 <!--
26@@ -99,10 +99,10 @@
27 <function model="account.invoice" name="pay_and_reconcile">
28 <value model="purchase.order" eval="[obj(ref('test_purchase_1')).invoice_id.id]" />
29 <value eval="1164" />
30- <value search="[('type', '=', 'cash')]" model="account.account"/>
31+ <value eval="ref('account.cash')"/>
32 <value eval="ref('account.period_' + str(int(time.strftime('%m'))))" />
33 <value eval="ref('account.bank_journal')" />
34- <value search="[('type', '=', 'cash')]" model="account.account"/>
35+ <value eval="ref('account.cash')"/>
36 <value eval="ref('account.period_' + str(int(time.strftime('%m'))))" />
37 <value eval="ref('account.bank_journal')" />
38 </function>