_check_product

Bug #1015679 reported by Fabio Colognesi

This bug report was converted into a question: question #201066: _check_product.

8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

On version 6.1.1 (10 June 2012 build) it was introduced a new function named "_check_product" in mrp.bom class; not present in 6.0's.
This function doesn't allow to save a Bill of Material containing a product repeated more than a time. In my opinion, this behaviour should be a customization and not part of the standard product, because in a Bill of Material I should be able to save more than a line referrring to the same part. Particularly, I could decide to insert in my BoM the same material having different cutting length.

To Reproduce:
1) Open a new BoM
2) Add a part twice or more to this BoM
3) Save the Bom

Result Observed
I have a message box that refers :
"Error Validate"
"Error occurred while validating the field(s) product_id: BoM line product should not be same as BoM product."
BoM won't be saved.

Result expected
I was expecting to save this BoM.

Platform
Windows XP Pro Sp 3 (or Ubuntu 10.4)
Eclipse 3.6.1
Python 2.6

Version:
openerp-6.1-20120609-233207.tar.gz

affects: openobject-server → openobject-addons
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Fabio,

This is not a bug but this thing is solved the bug.. ;-).
Before added this constraint recursive MO created and we should not allow it. See the bug lp:713221.

Without _check_product constraint we can create a recursive BOM and It will create a problem.
Let take one example, If my product A has component B and B has again component A. So this time recursive MO will generated.

So this fix should not allow this recursive same product on BOM, and avoid the same product on end limit. That's you can not allow the same product on BOM line. This thing is also fixed on 6.0 too on rev no 5210. Please check http://bazaar.launchpad.net/~openerp/openobject-addons/6.0/revision/5210#mrp/mrp.py for V6.

Now comes to your specific issue, you have add "material having different cutting length" then I suggest to you would you please try product variant (product_variant_multi) module. Create one product template and create it's differrent variant which will helps you for solve your specific scenario.

Hope this help.

So finally this is not bug rather then question that's why I am going to converting it.

Thanks for understanding!

Changed in openobject-addons:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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