[9.0] mrp_repair_refurbish: send consumed products for standard repair to scrap location.

This commit is contained in:
lreficent
2017-09-20 14:26:33 +02:00
committed by Lois Rilo
parent 0d773791bc
commit 8c477e0a07
3 changed files with 5 additions and 4 deletions

View File

@@ -88,4 +88,9 @@ class mrp_repair_line(orm.Model):
context['to_refurbish']):
res['value']['location_dest_id'] = context[
'refurbish_location_dest_id']
elif (type == 'add' and 'to_refurbish' in context and not
context['to_refurbish']):
scrap_location_ids = self.pool['stock.location'].search(cr, uid, [
('usage', '=', 'customer')], context=context)
res['value']['location_dest_id'] = scrap_location_ids[0]
return res

View File

@@ -4,8 +4,6 @@
<record id="product_normal_form_view" model="ir.ui.view">
<field name="name">product.product.form</field>
<field name="model">product.product</field>
<field name="mode">primary</field>
<field eval="7" name="priority"/>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<group name="inventory" position="after">

View File

@@ -4,8 +4,6 @@
<record id="product_template_only_form_view" model="ir.ui.view">
<field name="name">product.template.product.form</field>
<field name="model">product.template</field>
<field name="mode">primary</field>
<field name="priority" eval="8" />
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<group name="inventory" position="after">