the BoM does not validate field active nor dates
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=
date_stop=
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://
https:/
Related branches
- Chris Biersbach (OpenERP): Pending requested
- Olivier Dony (Odoo): Pending requested
- Moisés López - http://www.vauxoo.com: Pending requested
-
Diff: 18 lines (+7/-1)1 file modifiedmrp/mrp.py (+7/-1)
- Martin Trigaux (OpenERP) (community): Approve
- Naresh(OpenERP): Pending requested
-
Diff: 16 lines (+4/-2)1 file modifiedmrp/mrp.py (+4/-2)
- Naresh(OpenERP): Pending requested
-
Diff: 16 lines (+4/-2)1 file modifiedmrp/mrp.py (+4/-2)
- OpenERP Core Team: Pending requested
-
Diff: 28 lines (+10/-1)1 file modifiedmrp/mrp.py (+10/-1)
- Holger Brunn (Therp): Approve (code review)
- Stefan Rijnhart (Opener): Approve
- Pedro Manuel Baeza: Approve (code review)
-
Diff: 24 lines (+5/-2)1 file modifiedmrp/mrp.py (+5/-2)
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 |
Changed in openobject-addons: | |
status: | Fix Committed → Fix Released |
Changed in openobject-addons: | |
milestone: | none → 7.0 |
It seems that you forgot something Naresh, what i did to solve the problem in mrp.py:
@322 now().strftime( '%Y-%m- %d')
+ current_date = datetime.
@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 ?