[IMP] Clean

This commit is contained in:
Josse Colpaert 2014-08-26 17:28:40 +02:00
parent 9b34358196
commit 12d9333f48
2 changed files with 2 additions and 3 deletions

View File

@ -1151,11 +1151,9 @@ class mrp_production(osv.osv):
for line in production.product_lines:
if line.product_id.type != 'service':
stock_move_id = self._make_production_consume_line(cr, uid, line, context=context)
stock_moves.append(stock_move_id)
else:
self._make_service_procurement(cr, uid, line, context=context)
stock_move_id = False
if stock_move_id:
stock_moves.append(stock_move_id)
if stock_moves:
self.pool.get('stock.move').action_confirm(cr, uid, stock_moves, context=context)
production.write({'state': 'confirmed'}, context=context)

View File

@ -819,6 +819,7 @@ class sale_order_line(osv.osv):
for line in self.browse(cr, uid, ids, context=context):
if prod_obj.need_procurement(cr, uid, [line.product_id.id], context=context):
return True
return False
def _amount_line(self, cr, uid, ids, field_name, arg, context=None):
tax_obj = self.pool.get('account.tax')