summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Pinckaers <fp@tinyerp.com>2010-09-02 09:13:23 +0200
committerFabien Pinckaers <fp@tinyerp.com>2010-09-02 09:13:23 +0200
commite202e6d3d8dc852f0e1c4701cf5eb94b4f9be5f5 (patch)
treefb7ad3e7bf217c8e5648f86ae22cea6b17178742
parent3b5d0cec6d47913fe814bede22898f344f0399c3 (diff)
fix
bzr revid: fp@tinyerp.com-20100902071323-ecvr2r58cxa15898
-rw-r--r--addons/procurement/procurement.py10
-rw-r--r--addons/procurement/schedulers.py1
-rw-r--r--addons/project_mrp/test/project_task_procurement.yml2
3 files changed, 2 insertions, 11 deletions
diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py
index 298d9b05449..96d91e09b56 100644
--- a/addons/procurement/procurement.py
+++ b/addons/procurement/procurement.py
@@ -227,16 +227,6 @@ class procurement_order(osv.osv):
return True
return False
- def check_produce_service(self, cr, uid, procurement, context=[]):
- """ Checks project_mrp install or not.
- @return: True or False"""
- obj_module = self.pool.get('ir.module.module')
- module_id = obj_module.search(cr, uid, [('name', '=', 'project_mrp'),('state', '=', 'installed')])
- if module_id:
- return True
- cr.execute('update procurement_order set message=%s where id=%s', (_('Project_mrp module not installed !'), procurement.id))
- return False
-
def check_produce_product(self, cr, uid, procurement, context=[]):
""" Finds BoM of a product if not found writes exception message.
@param procurement: Current procurement.
diff --git a/addons/procurement/schedulers.py b/addons/procurement/schedulers.py
index 7007b13d06d..777a8de45cc 100644
--- a/addons/procurement/schedulers.py
+++ b/addons/procurement/schedulers.py
@@ -64,6 +64,7 @@ class procurement_order(osv.osv):
report_total = 0
report_except = 0
report_later = 0
+ allids = self.search(cr, uid, [])
while True:
cr.execute('select id from procurement_order where state=%s and procure_method=%s order by priority,date_planned limit 500 offset %s', ('confirmed', 'make_to_order', offset))
ids = map(lambda x: x[0], cr.fetchall())
diff --git a/addons/project_mrp/test/project_task_procurement.yml b/addons/project_mrp/test/project_task_procurement.yml
index 1e74680dcb7..a997f09fd04 100644
--- a/addons/project_mrp/test/project_task_procurement.yml
+++ b/addons/project_mrp/test/project_task_procurement.yml
@@ -58,7 +58,7 @@
-
!function {model: procurement.order, name: run_scheduler}:
- model: procurement.order
- search: "[('state','=','confirmed')]"
+ search: "[]"
-
Now I check that one task is created for my sale order.
-