[Trunk/6.1] Services with "Make to stock" procure_method stay in "Running" state

Bug #997642 reported by Yann Papouin on 2012-05-10
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 1
OpenERP Community Backports (Addons)
Undecided
Unassigned
6.1
Medium
Yann Papouin

Bug Description

If you install module [projet_mrp] you will see that all services with the "Make to stock" procure_method stay in "Running" state.

That's a bug in project_procurement.py:
- in action_check_finished, the result in combined from the super one and the new one defined in check_task_done of [projet_mrp]
- in check_task_done, all services are parsed with the task check condition, that MUST NOT be the case for services with the "Make to stock" procure method that will always return FALSE.

This is fixed in the patch attached.
Note that a message ('from project: task created.') is also set when the task is created to help user to understand why it stay in a running state.

Related branches

Yann Papouin (yann-papouin) wrote :
Amit Parik (amit-parik) wrote :

Hello Yann,

I have completely read your bur report but I am not understand why you need a service type product as a "Make to stock".

As per my knowledge always service type product are "Make to Order". How can you stock your service ;-) I am not understand this.

So would you please provide proper real time use case where we used a service product as a "Make to stock" (procure method).

So If service product are always "Make to order" then it's fine, If we have select "Make to stock" procure method for service type product and it will return False.

Thanks and waiting for your reply!

Changed in openobject-addons:
status: New → Incomplete
Yann Papouin (yann-papouin) wrote :

That's not the point. It just a patch to restore the default functionality when [project_mrp] is not installed.

"Make to order" -> "Produce" -> Create task
"Make to order" -> "Buy" -> Create quotation
"Make to stock" -> "Produce" -> Do nothing
"Make to stock" -> "Buy" -> Do nothing

Amit Parik (amit-parik) wrote :

Hello Yann,

Thanks for your fast reply!

I have checked both behaviour without project_mrp and with project_mrp.

Faced the inconsistency as you said, If I creates a SO as your scenario (without project_mrp) the procurement goes in to done state.
If I tried the same scenario with project_mrp installed, It will create a procurement with "Running"state which is wrong.

Also I have checked your patch it's solved this issue.

Thanks for contribution!

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
importance: Undecided → Low
status: Incomplete → Confirmed
summary: - [6.1] Services with "Make to stock" procure_method stay in "Running"
- state
+ [Trunk/6.1] Services with "Make to stock" procure_method stay in
+ "Running" state
Changed in openobject-addons:
status: Confirmed → Fix Committed

Hello Yann ,

Thanks for reporting!

It has been fixed on lp:~openerp-dev/openobject-addons/trunk-bug-997642-amb branch with following revision no and id.

rev no : 7310
rev id : 7310 <email address hidden>

Thanks again!

Fabien (Open ERP) (fp-tinyerp) wrote :

fixed in trunk, thanks for reporting.
The proposed patch was not good: proc.procurement_method instead of proc.product_id.procure_method

Changed in openobject-addons:
status: Fix Committed → Fix Released

This patch should also be included on 6.1.
Services to_stock should not create any procurement, having installed project_mrp or not.
I think this bug is duplicated or related with: https://bugs.launchpad.net/openobject-addons/+bug/1087709

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

Duplicates of this bug

Other bug subscribers