Skip to content

Commit 3736568

Browse files
author
ilo
committed
[18.0][MIG] delivery_carrier_label_default - remove alternative_send_ship method
1 parent 925bd5c commit 3736568

File tree

3 files changed

+5
-32
lines changed

3 files changed

+5
-32
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
from . import stock_picking
2-
from . import delivery_carrier

delivery_carrier_label_default/models/delivery_carrier.py

-24
This file was deleted.

delivery_carrier_label_default/tests/test_print_label.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def setUpClass(cls):
2121
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
2222

2323
Product = cls.env["product.product"]
24-
Picking = cls.env["stock.picking"]
25-
Move = cls.env["stock.move"]
24+
cls.Picking = cls.env["stock.picking"]
25+
cls.Move = cls.env["stock.move"]
2626
Carrier = cls.env["delivery.carrier"]
2727
ShippingLabel = cls.env["shipping.label"]
2828

@@ -43,7 +43,7 @@ def setUpClass(cls):
4343
}
4444
)
4545

46-
cls.picking = Picking.create(
46+
cls.picking = cls.Picking.create(
4747
{
4848
"partner_id": cls.env.ref("base.res_partner_12").id,
4949
"picking_type_id": cls.env.ref("stock.picking_type_out").id,
@@ -55,7 +55,7 @@ def setUpClass(cls):
5555
cls.product_a = Product.create({"name": "Product A"})
5656
cls.product_b = Product.create({"name": "Product B"})
5757

58-
cls.move1 = Move.create(
58+
cls.move1 = cls.Move.create(
5959
{
6060
"name": "Move A",
6161
"picking_id": cls.picking.id,
@@ -67,7 +67,7 @@ def setUpClass(cls):
6767
}
6868
)
6969

70-
cls.move2 = Move.create(
70+
cls.move2 = cls.Move.create(
7171
{
7272
"name": "a second move",
7373
"product_id": cls.product_b.id,
@@ -106,7 +106,6 @@ def check_label_content(self, b64_datas):
106106
tags = self.find_div_class(node, div_class)
107107
self.assertEqual(len(tags), 1)
108108

109-
# @patch_label_file_type
110109
def test_001_print_default_label(self):
111110
# assign picking to generate 'stock.move.line'
112111
self.picking.send_to_shipper()
@@ -117,7 +116,6 @@ def test_001_print_default_label(self):
117116
self.assertEqual(label.file_type, "html")
118117
self.check_label_content(label.datas)
119118

120-
# @patch_label_file_type
121119
def test_002_print_default_label_selected_packs(self):
122120
# create packs
123121
self.move1.move_line_ids[0].write({"quantity": 3, "picked": True})

0 commit comments

Comments
 (0)