[FIX] Services type procurements are also important to trigger sale wkf

This commit is contained in:
Josse Colpaert 2014-08-13 17:19:40 +02:00
parent 86b8e73482
commit bd5550e832
1 changed files with 1 additions and 1 deletions

View 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)