the BoM does not validate field active nor dates

Bug #1049415 reported by Julio Serna-http://www.vauxoo.com
58
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP Publisher's Warranty Team
OpenERP Community Backports (Addons)
New
Undecided
Unassigned
6.1
Fix Released
Low
Yann Papouin

Bug Description

Modules Installed: mrp

1.-Steps to reproduce the issue you have observed

using a bill of materials "ARM100 + Subproduct" for the product [ARM100] Cabinet and having in mind that the current date is 11-sep-2012 we modified the next values:
active=False
date_start='01-11-2012'
date_stop='10-11-2012'

2.- The result you observed
When creating the order of production for the product [ARM100] Cabinet it gets the BoM "ARM100 + Subproduct"

3.-The result you expected
When creating the order of production for the product [ARM100] Cabinet it must not get the BoM ARM100 + Subproduct because its not active and its out of a valid date range

4.-
Ubuntu. 12.04, Python 2.7.2+
openerp- addons :6985
openerp- server : 4265

NOTE: link about the issue video and merge purposal
http://www.youtube.com/watch?v=h5YurDp30v0
https://code.launchpad.net/~vauxoo/openobject-addons/addons-6.1-mrp_bug_bom-dev-julio/+merge/123865

Tags: maintenance

Related branches

Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Changed in openobject-addons:
status: New → Fix Committed
importance: Undecided → Low
Revision history for this message
Julius (8mabmzqcnyc1g4i-contact-clubl5mz6ldresg) wrote :

It seems that you forgot something Naresh, what i did to solve the problem in mrp.py:

@322
+ current_date = datetime.now().strftime('%Y-%m-%d')

@342
- if addthis and not bom.bom_lines:

+ if addthis and not bom.bom_lines and bom.active==True and (bom.date_start is False or bom.date_start <= current_date) and (bom.date_start is False or bom.date_stop >= current_date):

Someone can confirm this is working ?

Revision history for this message
Egor Tsinko (etsinko) wrote :

The fix should also manage the situation when date_start or date_stop present in BoM's lines

Revision history for this message
Leigh Willard (leigh) wrote :

in version 7 of OpenERP, when I set a Stop Date in a BOM line, it is ignored.

This is the same bug I presume.

When will this be fixed?

Changed in openobject-addons:
status: Fix Committed → Fix Released
Changed in openobject-addons:
milestone: none → 7.0
Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) wrote :

Isn't this "fix released" in OCB v7 ?

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

Other bug subscribers

Remote bug watches

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