Amit Bhavsar (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-997642-amb into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #997642 in OpenERP Addons: "[Trunk/6.1] Services with "Make to stock"
procure_method stay in "Running" state"
https://bugs.launchpad.net/openobject-addons/+bug/997642
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-997642-amb/+merge/121393
Hello,
It's raised the problem when create S.O with project_mrp installed for service
product.
Now Fixes the problem of procurement for service product with latest addons.
Thanks!
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-997642-amb/+merge/121393
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-997642-amb.
=== modified file 'project_mrp/project_procurement.py'
--- project_mrp/project_procurement.py 2012-08-06 06:11:13 +0000
+++ project_mrp/project_procurement.py 2012-08-27 10:18:02 +0000
@@ -37,8 +37,9 @@
""" Checks if task is done or not.
@return: True or False.
"""
- return all(proc.product_id.type != 'service' or (proc.task_id and proc.task_id.state in ('done', 'cancelled')) \
+ res = all((proc.product_id.type != 'service') or ((proc.product_id.type == 'service') and (proc.product_id.procure_method == 'make_to_stock')) or (proc.task_id and proc.task_id.state in ('done', 'cancelled')) \
for proc in self.browse(cr, uid, ids, context=context))
+ return res
def check_produce_service(self, cr, uid, procurement, context=None):
return True
@@ -80,7 +81,7 @@
'project_id': project and project.id or False,
'company_id': procurement.company_id.id,
},context=context)
- self.write(cr, uid, [procurement.id], {'task_id': task_id, 'state': 'running'}, context=context)
+ self.write(cr, uid, [procurement.id], {'task_id': task_id, 'state': 'running', 'message':'from project: task created.'}, context=context)
self.running_send_note(cr, uid, ids, context=None)
return task_id
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp