diff --git a/shopfloor_packing_info/__manifest__.py b/shopfloor_packing_info/__manifest__.py
index 194d818bc2..96ca5d9291 100644
--- a/shopfloor_packing_info/__manifest__.py
+++ b/shopfloor_packing_info/__manifest__.py
@@ -10,12 +10,11 @@
"author": "Camptocamp, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
- "depends": ["shopfloor", "sales_team"],
+ "depends": ["shopfloor", "sales_team", "stock_picking_partner_note"],
"data": [
"security/ir.model.access.csv",
"views/res_partner_views.xml",
"views/shopfloor_packing_info_views.xml",
- "views/stock_picking_type_views.xml",
"views/stock_picking_views.xml",
"views/menus.xml",
],
diff --git a/shopfloor_packing_info/models/__init__.py b/shopfloor_packing_info/models/__init__.py
index 22bac6bc7c..02aa20a9f8 100644
--- a/shopfloor_packing_info/models/__init__.py
+++ b/shopfloor_packing_info/models/__init__.py
@@ -3,4 +3,3 @@
from . import res_partner
from . import shopfloor_packing_info
from . import stock_picking
-from . import stock_picking_type
diff --git a/shopfloor_packing_info/models/stock_picking.py b/shopfloor_packing_info/models/stock_picking.py
index 08328b2092..bd3ad92da8 100644
--- a/shopfloor_packing_info/models/stock_picking.py
+++ b/shopfloor_packing_info/models/stock_picking.py
@@ -10,6 +10,3 @@ class StockPicking(models.Model):
string="Packing information",
related="partner_id.shopfloor_packing_info_id",
)
- shopfloor_display_packing_info = fields.Boolean(
- related="picking_type_id.shopfloor_display_packing_info",
- )
diff --git a/shopfloor_packing_info/models/stock_picking_type.py b/shopfloor_packing_info/models/stock_picking_type.py
deleted file mode 100644
index cc2590bc00..0000000000
--- a/shopfloor_packing_info/models/stock_picking_type.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright 2021 Camptocamp SA (https://www.camptocamp.com)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
-from odoo import fields, models
-
-
-class StockPickingType(models.Model):
- _inherit = "stock.picking.type"
-
- shopfloor_display_packing_info = fields.Boolean(
- string="Display customer packing info",
- help="For the Shopfloor Checkout/Packing scenarios to display the"
- " customer packing info.",
- )
diff --git a/shopfloor_packing_info/services/checkout.py b/shopfloor_packing_info/services/checkout.py
index a96b388606..b806fe0046 100644
--- a/shopfloor_packing_info/services/checkout.py
+++ b/shopfloor_packing_info/services/checkout.py
@@ -10,7 +10,7 @@ class CheckoutExt(Checkout):
def _data_for_packing_info(self, picking):
res = super()._data_for_packing_info(picking)
- if picking.picking_type_id.shopfloor_display_packing_info:
+ if picking.note:
shopfloor_packing_info = (
picking.shopfloor_packing_info_id.text
if picking.shopfloor_packing_info_id
diff --git a/shopfloor_packing_info/tests/test_checkout_scan_line.py b/shopfloor_packing_info/tests/test_checkout_scan_line.py
index 2d0658baf7..759b63fc1b 100644
--- a/shopfloor_packing_info/tests/test_checkout_scan_line.py
+++ b/shopfloor_packing_info/tests/test_checkout_scan_line.py
@@ -17,6 +17,7 @@ def test_scan_line_package_ok_packing_info_filled_info(self):
.create({"name": "Test", "text": packing_info_text})
)
picking.sudo().partner_id.shopfloor_packing_info_id = shopfloor_packing_info
+ # TODO: shopfloor_display_packing_info doesn't exist anymore
picking.sudo().picking_type_id.shopfloor_display_packing_info = True
move1 = picking.move_lines[0]
move2 = picking.move_lines[1]
diff --git a/shopfloor_packing_info/views/stock_picking_type_views.xml b/shopfloor_packing_info/views/stock_picking_type_views.xml
deleted file mode 100644
index 72ae155918..0000000000
--- a/shopfloor_packing_info/views/stock_picking_type_views.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- Operation Types
- stock.picking.type
-
-
-
-
-
-
-
-
diff --git a/shopfloor_packing_info/views/stock_picking_views.xml b/shopfloor_packing_info/views/stock_picking_views.xml
index 611b98b2ac..2ad37f21b9 100644
--- a/shopfloor_packing_info/views/stock_picking_views.xml
+++ b/shopfloor_packing_info/views/stock_picking_views.xml
@@ -10,11 +10,7 @@
position="before"
>
-
-
+
-
-
+