← Back to team overview

openerp-india team mailing list archive

[Bug 1006778] Re: [6.1] Infinite loop in procurement run by scheduler

 

Hello Yann Papouin,

I have tested your scenario, I have face the same problem. also I am  check the scenario another way,,,,
Lets see,
First, I confirm the S.O for the "product A". and than I check the procurement exceptions. For "product A", procurement status is waiting. where sub product B procurement status is running.
So it's definitely problem. That's why I am confirm this Issue with medium Importance.


Thanks for the reporting!

** Changed in: openobject-addons
       Status: New => Confirmed

** Changed in: openobject-addons
   Importance: Undecided => Medium

** Changed in: openobject-addons
     Assignee: (unassigned) => OpenERP R&D Addons Team 2 (openerp-dev-addons2)

** Summary changed:

- [6.1] Infinite loop in procurement run by scheduler
+ [Trunk/6.1] Infinite loop in procurement run by scheduler

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1006778

Title:
  [Trunk/6.1] Infinite loop in procurement run by scheduler

Status in OpenERP Addons (modules):
  Confirmed

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.py:124]	
  	_procure_confirm [schedulers.py:82]	
  	run_scheduler [schedulers.py:39]	
  	_procure_calculation_all [schedulers_all.py:52]	
  	run [threading.py:484]	
  	__bootstrap_inner [threading.py:532]	
  	__bootstrap [threading.py:504]

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1006778/+subscriptions


References