File tree 3 files changed +7
-5
lines changed
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 4
4
5
5
{
6
6
'name' : 'Sale Order Route' ,
7
- 'version' : '16 .0.1.0.0' ,
7
+ 'version' : '18 .0.1.0.0' ,
8
8
'category' : 'Sales' ,
9
9
'license' : 'AGPL-3' ,
10
10
'summary' : 'Set route on sale order' ,
18
18
'website' : 'http://www.akretion.com' ,
19
19
'depends' : ['sale_stock' ],
20
20
'data' : ['views/sale_order.xml' , 'views/sale_report.xml' ],
21
- 'installable' : False ,
21
+ 'installable' : True ,
22
22
}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def _action_confirm(self):
22
22
vals = {'route_id' : order .route_id .id or False }
23
23
order .order_line .filtered (
24
24
lambda l :
25
- l .product_id and l .product_id .type in ( 'product' , ' consu') ).write (vals )
25
+ l .product_id and l .product_id .type == ' consu' ).write (vals )
26
26
return super ()._action_confirm ()
27
27
28
28
@@ -35,7 +35,7 @@ class SaleOrderLine(models.Model):
35
35
@api .depends ('display_type' , 'product_id' )
36
36
def _compute_route_id (self ):
37
37
for line in self :
38
- if not line .display_type and line .product_id and line .product_id .type in ( 'product' , ' consu') :
38
+ if not line .display_type and line .product_id and line .product_id .type == ' consu' :
39
39
line .route_id = line .order_id .route_id or False
40
40
else :
41
41
line .route_id = False
Original file line number Diff line number Diff line change 20
20
21
21
<record id =" view_quotation_tree" model =" ir.ui.view" >
22
22
<field name =" model" >sale.order</field >
23
- <field name =" inherit_id" ref =" sale_stock.view_quotation_tree " />
23
+ <field name =" inherit_id" ref =" sale_stock.sale_order_tree " />
24
24
<field name =" arch" type =" xml" >
25
25
<field name =" warehouse_id" position =" after" >
26
26
<field name =" route_id" optional =" hide" />
27
27
</field >
28
28
</field >
29
29
</record >
30
30
31
+ <!--
31
32
<record id="view_order_tree" model="ir.ui.view">
32
33
<field name="model">sale.order</field>
33
34
<field name="inherit_id" ref="sale_stock.view_order_tree"/>
36
37
<field name="route_id" optional="hide"/>
37
38
</field>
38
39
</field>
40
+ -->
39
41
</record >
40
42
41
43
You can’t perform that action at this time.
0 commit comments