[FIX] Services type procurements are also important to trigger sale wkf
authorJosse Colpaert <jco@odoo.com>
Wed, 13 Aug 2014 15:19:40 +0000 (17:19 +0200)
committerJosse Colpaert <jco@odoo.com>
Wed, 3 Sep 2014 17:18:16 +0000 (19:18 +0200)
addons/sale/sale.py

index ef06df5..977d527 100644 (file)
@@ -1254,7 +1254,7 @@ class procurement_order(osv.osv):
         from openerp import workflow
         if vals.get('state') in ['done', 'cancel', 'exception']:
             for proc in self.browse(cr, uid, ids, context=context):
-                if proc.sale_line_id and proc.sale_line_id.order_id and proc.move_ids:
+                if proc.sale_line_id and proc.sale_line_id.order_id:
                     order_id = proc.sale_line_id.order_id.id
                     if self.pool.get('sale.order').test_procurements_done(cr, uid, [order_id], context=context):
                         workflow.trg_validate(uid, 'sale.order', order_id, 'ship_end', cr)