[7.0/trunk] Purchase Requisition : Error while running procurement.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Confirmed
|
Medium
|
OpenERP R&D Addons Team 2 |
Bug Description
Steps to reproduce the issue:
1. Create a new database without demo data.
2. Install purchase_
3. Create a new product with following configuration:
Product Type : Stockable Product
Procurement Method : Make to Stock
Supply Method : Buy
4. Tick the 'Purchase Requisition' on product.
5. Now from product, clicked on 'Request Procurement' button to create the procurement.
Run the procurement. It gives the traceback as follow:
Traceback (most recent call last):
File "/home/
result = dispatch(method, params)
File "/home/
res = fn(db, uid, *params)
File "/home/
return f(dbname, *args, **kwargs)
File "/home/
res = exec_workflow_
File "/home/
return object.
File "/home/
result[res_id] = workflow.
File "/home/
res2 = instance.
File "/home/
workitem.
File "/home/
ok = _split_test(cr, workitem, activity[
File "/home/
_join_test(cr, t[0], t[1], ident, stack)
File "/home/
create(
File "/home/
process(cr, res, ident, stack=stack)
File "/home/
ok = _split_test(cr, workitem, activity[
File "/home/
_join_test(cr, t[0], t[1], ident, stack)
File "/home/
create(
File "/home/
process(cr, res, ident, stack=stack)
File "/home/
ok = _split_test(cr, workitem, activity[
File "/home/
_join_test(cr, t[0], t[1], ident, stack)
File "/home/
create(
File "/home/
process(cr, res, ident, stack=stack)
File "/home/
result = _execute(cr, workitem, activity, ident, stack)
File "/home/
id_new = cr.fetchone()[0]
TypeError: 'NoneType' object has no attribute '__getitem__'
Thanks,
Divyesh
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 11 lines (+1/-0)1 file modifiedpurchase_requisition/purchase_requisition.py (+1/-0)
affects: | openobject-server → openobject-addons |
Changed in openobject-addons: | |
assignee: | nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2) |
importance: | Undecided → Medium |
status: | New → Confirmed |
tags: | added: purchase |
An error is due to the procurement workflow defined in purchase module. In procurement workflow there is a subflow to purchase order.
The action defined in subflow must return the ID of the concerned resource by the subflow ! If the action returns False, the workitem disappears !
The action defined in subflow return the ID of 'purchase. requisition' instead of 'purchase.order'. This creates the problem.