[ocb-6.1] Failing test in purchase_double_validation

Bug #1244663 reported by Stefan Rijnhart (Opener)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP Community Backports (Addons)
New
Undecided
Unassigned
6.1
Fix Committed
Undecided
Unassigned

Bug Description

2013-10-25 00:52:38,223 8571 INFO 6-1-ocb-23520-all openerp.modules.loading: module purchase_double_validation: loading test/purchase_double_validation_demo.yml
...
2013-10-25 00:52:38,586 8571 TEST 6-1-ocb-23520-all openerp.tools.yaml_import: In order to test the flow, I confirmed the purchase order.
2013-10-25 00:52:38,641 8571 TEST 6-1-ocb-23520-all openerp.tools.yaml_import: I check that the order which was initially in the draft state has transmit to confirm state for double validation it should not an Approve state.
2013-10-25 00:52:38,643 8571 TEST 6-1-ocb-23520-all openerp.tools.yaml_import: I Approved the purchase order.
2013-10-25 00:52:38,717 8571 ERROR 6-1-ocb-23520-all openerp.tools.yaml_import: global name '_' is not defined
  File "/home/odoo/runbot/static/ocb-6-1-ocb-23520/server/openerp/addons/purchase/purchase.py", line 366, in action_invoice_create
    acc_id = self._choose_account_from_po_line(cr, uid, po_line, context=context)
  File "/home/odoo/runbot/static/ocb-6-1-ocb-23520/server/openerp/addons/account_anglo_saxon/purchase.py", line 36, in _choose_account_from_po_line
    raise osv.except_osv(_('Error !'), _('There is no stock input account defined for this product or category: "%s" (id:%d)') % (order_line.product_id.name, order_line.product_id.id,))
NameError: global name '_' is not defined

The error is misleading, of course. The culprit is a backport of http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/8787, but with an additional check on the availability of the stock input account. This account is not configured in the (nonexisting) demo data of account_anglo_saxon.

Related branches

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.