Remove code... it was native !

This commit is contained in:
Alexis de Lattre
2014-04-09 12:13:58 +02:00
parent 3ee3edb8ce
commit 5075221428
2 changed files with 5 additions and 13 deletions

View File

@@ -30,14 +30,6 @@ class sale_order(orm.Model):
'order_policy': 'picking',
}
def action_button_confirm(self, cr, uid, ids, context=None):
assert len(ids) == 1, 'Only one ID'
so = self.browse(cr, uid, ids[0], context=context)
service_only = True
for line in so.order_line:
if line.product_id and line.product_id.type != 'service':
service_only = False
if service_only:
so.write({'order_policy': 'manual'})
return super(sale_order, self).action_button_confirm(
cr, uid, ids, context=context)
# The function action_wait in sale_stock/sale_stock.py line 224
# ensures that the order_policy switches to 'manual' when
# we only have services in the order