[Trunk/6.1] Infinite loop in procurement run by scheduler
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Confirmed
|
Medium
|
OpenERP R&D Addons Team 2 |
Bug Description
New bug report only for 6.1 as the previous one (lp#918288) is set to invalid.
Steps to reproduce:
- Create new database WITHOUT demonstration data
- Log in as Administrator
- Install [SALES], [PURCHASE], [WAREHOUSE], [MRP]
[SALES]
Create a new product "Product A" and set:
- Product Type: Stockable Product
- Procurement Method: Make to Order
- Supply method : Produce
Create a new product "Product B" and set:
- Product Type: Stockable Product
- Procurement Method: Make to Order
- Supply method : Buy
- Create a new supplier and add it to the suppliers tab
[MANUFACTURING]
Create a new BOM for "Product A" and set:
- BoM Type: Sets / Phantom
- Add component "Product B" with quantity of 1.0
[PRODUCTS]
- Go to "Product A" form view in click on "Procurement Request" action
- Select main Warehouse an click on "Ask New Products"
- In the procurement form, click on "Run Procurement"
[WAREHOUSE]
Run schedulers manually with "Compute Schedulers"
- Click on "Compute Schedulers"
- Go to "Procurement Exceptions" and uncheck "To fix" in order to view everything
Expected:
=== USER POINT OF VIEW ===
- A new quotation is created for "Product B"
Result:
=== USER POINT OF VIEW ===
- Product A is locked in "Confirmed" state
=== SERVER POINT OF VIEW ===
A new python thread is stuck in an infinite loop "while True" in _procure_confirm (schedulers.py), if you debug the process you will see that:
- "offset" is never increased
- "report_total" is constantly increased
Thread-1004 - pid707_seq179
execute [sql_db.py:222]
wrapper [sql_db.py:152]
_read_flat [orm.py:3465]
read [orm.py:3406]
__getitem__ [orm.py:391]
__getattr__ [orm.py:476]
get_phantom_bom_id [procurement.py:52]
function_proxy [orm.py:368]
<module> [server:1]
safe_eval [safe_eval.py:241]
_eval_expr [wkf_expr.py:58]
check [wkf_expr.py:81]
_split_test [workitem.py:158]
process [workitem.py:61]
validate [instance.py:48]
trg_validate [wkf_service.
_procure_confirm [schedulers.py:82]
run_scheduler [schedulers.py:39]
_procure_
run [threading.py:484]
__bootstrap_inner [threading.py:532]
__bootstrap [threading.py:504]
tags: | added: procurement |
Hello,
I confirm this issue.
I encountered it without knowing exactly how to reproduce it with a scenario, so I'm grateful to see your clean scenario.
But I also found the same conclusion than your "server point of view" chapter.
Thanks
Guewen