Skip to content

Commit f228762

Browse files
[MIG] sale_order_route to 18
1 parent a6f1d4a commit f228762

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

sale_order_route/__manifest__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
'name': 'Sale Order Route',
7-
'version': '16.0.1.0.0',
7+
'version': '18.0.1.0.0',
88
'category': 'Sales',
99
'license': 'AGPL-3',
1010
'summary': 'Set route on sale order',
@@ -18,5 +18,5 @@
1818
'website': 'http://www.akretion.com',
1919
'depends': ['sale_stock'],
2020
'data': ['views/sale_order.xml', 'views/sale_report.xml'],
21-
'installable': False,
21+
'installable': True,
2222
}

sale_order_route/models/sale_order.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def _action_confirm(self):
2222
vals = {'route_id': order.route_id.id or False}
2323
order.order_line.filtered(
2424
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)
2626
return super()._action_confirm()
2727

2828

@@ -35,7 +35,7 @@ class SaleOrderLine(models.Model):
3535
@api.depends('display_type', 'product_id')
3636
def _compute_route_id(self):
3737
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':
3939
line.route_id = line.order_id.route_id or False
4040
else:
4141
line.route_id = False

sale_order_route/views/sale_order.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@
2020

2121
<record id="view_quotation_tree" model="ir.ui.view">
2222
<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"/>
2424
<field name="arch" type="xml">
2525
<field name="warehouse_id" position="after">
2626
<field name="route_id" optional="hide"/>
2727
</field>
2828
</field>
2929
</record>
3030

31+
<!--
3132
<record id="view_order_tree" model="ir.ui.view">
3233
<field name="model">sale.order</field>
3334
<field name="inherit_id" ref="sale_stock.view_order_tree"/>
@@ -36,6 +37,7 @@
3637
<field name="route_id" optional="hide"/>
3738
</field>
3839
</field>
40+
-->
3941
</record>
4042

4143

0 commit comments

Comments
 (0)