mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[MIG] stock_mts_mto_rule: Migration to 16.0
This commit is contained in:
committed by
Aleksander Milinkevich
parent
1ac0c6315d
commit
c71a1ff4a5
@@ -3,7 +3,7 @@
|
||||
{
|
||||
"name": "Stock MTS+MTO Rule",
|
||||
"summary": "Add a MTS+MTO route",
|
||||
"version": "15.0.1.0.1",
|
||||
"version": "16.0.1.0.0",
|
||||
"development_status": "Mature",
|
||||
"category": "Warehouse",
|
||||
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!--
|
||||
Procurement rules
|
||||
-->
|
||||
<record id="route_mto_mts" model='stock.location.route'>
|
||||
<record id="route_mto_mts" model='stock.route'>
|
||||
<field name="name">Make To Order + Make To Stock</field>
|
||||
<field name="sequence">5</field>
|
||||
<field name="product_selectable" eval="True" />
|
||||
|
||||
@@ -65,7 +65,7 @@ class StockWarehouse(models.Model):
|
||||
"name": self._format_rulename(
|
||||
location_id, location_dest_id, "MTS+MTO"
|
||||
),
|
||||
"location_id": location_dest_id.id,
|
||||
"location_dest_id": location_dest_id.id,
|
||||
"location_src_id": location_id.id,
|
||||
"picking_type_id": picking_type_id.id,
|
||||
},
|
||||
@@ -88,7 +88,7 @@ class StockWarehouse(models.Model):
|
||||
# _get_global_route_rules_values
|
||||
rule = self.env["stock.rule"].search(
|
||||
[
|
||||
("location_id", "=", self.mts_mto_rule_id.location_id.id),
|
||||
("location_dest_id", "=", self.mts_mto_rule_id.location_dest_id.id),
|
||||
("location_src_id", "=", self.mts_mto_rule_id.location_src_id.id),
|
||||
("route_id", "=", self.delivery_route_id.id),
|
||||
],
|
||||
|
||||
@@ -186,7 +186,7 @@ class TestMtoMtsRoute(TransactionCase):
|
||||
mts_mto_route = self.warehouse.mts_mto_rule_id
|
||||
self.assertEqual(mts_mto_route.warehouse_id, self.warehouse)
|
||||
self.assertEqual(
|
||||
mts_mto_route.location_id, self.warehouse.mto_pull_id.location_id
|
||||
mts_mto_route.location_dest_id, self.warehouse.mto_pull_id.location_dest_id
|
||||
)
|
||||
self.assertEqual(
|
||||
mts_mto_route.picking_type_id, self.warehouse.mto_pull_id.picking_type_id
|
||||
@@ -233,9 +233,9 @@ class TestMtoMtsRoute(TransactionCase):
|
||||
"warehouse_selectable": True,
|
||||
"name": "dummy route",
|
||||
}
|
||||
self.dummy_route = self.env["stock.location.route"].create(route_vals)
|
||||
self.dummy_route = self.env["stock.route"].create(route_vals)
|
||||
rule_vals = {
|
||||
"location_id": self.env.ref("stock.stock_location_stock").id,
|
||||
"location_dest_id": self.env.ref("stock.stock_location_stock").id,
|
||||
"location_src_id": self.env.ref("stock.stock_location_suppliers").id,
|
||||
"action": "pull",
|
||||
"warehouse_id": self.warehouse.id,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="stock_location_route_form_view_mto_mto" model="ir.ui.view">
|
||||
<field name="name">stock.location.route.form.mts.mto</field>
|
||||
<field name="model">stock.location.route</field>
|
||||
<field name="name">stock.route.form.mts.mto</field>
|
||||
<field name="model">stock.route</field>
|
||||
<field name="inherit_id" ref="stock.stock_location_route_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="action" position="after">
|
||||
|
||||
Reference in New Issue
Block a user