c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #08142
[Bug 690234] Re: 6.0 RC1 mrp_repair error if repair contains a product that its warranty is not multiple of 12
** Changed in: openobject-addons
Importance: Undecided => Medium
** Changed in: openobject-addons
Status: New => Confirmed
** Changed in: openobject-addons
Assignee: (unassigned) => OpenERP R&D Addons Team 2 (openerp-dev-addons2)
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/690234
Title:
6.0 RC1 mrp_repair error if repair contains a product that its warranty is not multiple of 12
Status in OpenObject Addons Modules:
Confirmed
Bug description:
6.0 RC1 mrp_repair module:
An error appears when a repair is created and a product whose warranty is not multiple of 12 is selected.
File "/home/bin/addons/mrp_repair/mrp_repair.py", line 225, in onchange_move_id
limit = datetime.strptime(move.date_expected, '%Y-%m-%d %H:%M:%S') + relativedelta(months=product.warranty)
File "/var/lib/python-support/python2.5/dateutil/relativedelta.py", line 261, in __radd__
day = min(calendar.monthrange(year, month)[1],
File "/usr/lib/python2.5/calendar.py", line 123, in monthrange
ndays = mdays[month] + (month == February and isleap(year))
TypeError: list indices must be integers
It could be fixed changing file "mrp_repair/mrp_repair.py", line 225, in onchange_move_id
limit = datetime.strptime(move.date_expected, '%Y-%m-%d %H:%M:%S') + relativedelta(months=product.warranty)
to
limit = datetime.strptime(move.date_expected, '%Y-%m-%d %H:%M:%S') + relativedelta(months=int(product.warranty))
References