odoo-addon-shipment-advice 16.0.1.7.2.3__py3-none-any.whl → 18.0.1.0.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/shipment_advice/README.rst +29 -28
- odoo/addons/shipment_advice/__manifest__.py +4 -4
- odoo/addons/shipment_advice/data/queue_job_channel.xml +4 -4
- odoo/addons/shipment_advice/data/queue_job_function.xml +18 -15
- odoo/addons/shipment_advice/i18n/it.po +2 -2
- odoo/addons/shipment_advice/i18n/shipment_advice.pot +78 -109
- odoo/addons/shipment_advice/models/shipment_advice.py +32 -67
- odoo/addons/shipment_advice/models/stock_move_line.py +23 -21
- odoo/addons/shipment_advice/models/stock_package_level.py +12 -1
- odoo/addons/shipment_advice/models/stock_picking.py +7 -5
- odoo/addons/shipment_advice/readme/CONTRIBUTORS.md +12 -0
- odoo/addons/shipment_advice/report/report_shipment_advice.xml +1 -1
- odoo/addons/shipment_advice/static/description/index.html +17 -20
- odoo/addons/shipment_advice/tests/common.py +6 -7
- odoo/addons/shipment_advice/tests/test_shipment_advice.py +2 -2
- odoo/addons/shipment_advice/tests/test_shipment_advice_async.py +3 -3
- odoo/addons/shipment_advice/tests/test_shipment_advice_load.py +12 -4
- odoo/addons/shipment_advice/tests/test_shipment_advice_picking_values.py +2 -2
- odoo/addons/shipment_advice/tests/test_shipment_advice_stock_user.py +1 -1
- odoo/addons/shipment_advice/tests/test_shipment_advice_unload.py +6 -6
- odoo/addons/shipment_advice/views/res_config_settings.xml +28 -33
- odoo/addons/shipment_advice/views/shipment_advice.xml +42 -64
- odoo/addons/shipment_advice/views/stock_move.xml +4 -1
- odoo/addons/shipment_advice/views/stock_move_line.xml +9 -8
- odoo/addons/shipment_advice/views/stock_package_level.xml +5 -5
- odoo/addons/shipment_advice/views/stock_picking.xml +9 -16
- odoo/addons/shipment_advice/wizards/load_shipment.py +15 -15
- odoo/addons/shipment_advice/wizards/load_shipment.xml +9 -20
- odoo/addons/shipment_advice/wizards/plan_shipment.py +10 -10
- odoo/addons/shipment_advice/wizards/plan_shipment.xml +6 -16
- odoo/addons/shipment_advice/wizards/unload_shipment.py +6 -6
- odoo/addons/shipment_advice/wizards/unload_shipment.xml +4 -11
- odoo/addons/shipment_advice/wizards/unplan_shipment.py +6 -6
- odoo/addons/shipment_advice/wizards/unplan_shipment.xml +5 -16
- {odoo_addon_shipment_advice-16.0.1.7.2.3.dist-info → odoo_addon_shipment_advice-18.0.1.0.0.4.dist-info}/METADATA +37 -36
- odoo_addon_shipment_advice-18.0.1.0.0.4.dist-info/RECORD +56 -0
- {odoo_addon_shipment_advice-16.0.1.7.2.3.dist-info → odoo_addon_shipment_advice-18.0.1.0.0.4.dist-info}/WHEEL +1 -1
- odoo_addon_shipment_advice-18.0.1.0.0.4.dist-info/top_level.txt +1 -0
- odoo/addons/shipment_advice/readme/CONTRIBUTORS.rst +0 -13
- odoo/addons/shipment_advice/readme/CREDITS.rst +0 -6
- odoo_addon_shipment_advice-16.0.1.7.2.3.dist-info/RECORD +0 -57
- odoo_addon_shipment_advice-16.0.1.7.2.3.dist-info/top_level.txt +0 -1
- /odoo/addons/shipment_advice/readme/{DESCRIPTION.rst → DESCRIPTION.md} +0 -0
|
@@ -15,7 +15,7 @@ class TestShipmentAdvice(Common):
|
|
|
15
15
|
cls.shipment_advice_in.run_in_queue_job = True
|
|
16
16
|
cls.shipment_advice_out.run_in_queue_job = True
|
|
17
17
|
cls.product_out4 = cls.env["product.product"].create(
|
|
18
|
-
{"name": "product_out4", "type": "
|
|
18
|
+
{"name": "product_out4", "is_storable": True, "type": "consu"}
|
|
19
19
|
)
|
|
20
20
|
cls.group1 = cls.env["procurement.group"].create({})
|
|
21
21
|
cls.group2 = cls.env["procurement.group"].create({})
|
|
@@ -53,7 +53,7 @@ class TestShipmentAdvice(Common):
|
|
|
53
53
|
self.plan_records_in_shipment(self.shipment_advice_in, picking)
|
|
54
54
|
self.progress_shipment_advice(self.shipment_advice_in)
|
|
55
55
|
for ml in picking.move_line_ids:
|
|
56
|
-
ml.
|
|
56
|
+
ml.picked = True
|
|
57
57
|
picking._action_done()
|
|
58
58
|
with trap_jobs() as trap:
|
|
59
59
|
self.shipment_advice_in.action_done()
|
|
@@ -83,7 +83,7 @@ class TestShipmentAdvice(Common):
|
|
|
83
83
|
self.progress_shipment_advice(self.shipment_advice_in)
|
|
84
84
|
# Receive it (making its related transfer partially received)
|
|
85
85
|
for ml in self.move_product_in1.move_line_ids:
|
|
86
|
-
ml.
|
|
86
|
+
ml.picked = True
|
|
87
87
|
self.assertEqual(picking, self.move_product_in2.picking_id)
|
|
88
88
|
# When validating the shipment, a backorder is created for unprocessed moves
|
|
89
89
|
with trap_jobs() as trap:
|
|
@@ -150,11 +150,19 @@ class TestShipmentAdviceLoad(Common):
|
|
|
150
150
|
package_level,
|
|
151
151
|
)
|
|
152
152
|
|
|
153
|
-
def
|
|
154
|
-
"""
|
|
153
|
+
def test_load_check_package_partial_loading(self):
|
|
154
|
+
"""
|
|
155
|
+
Test that loading only part of a package fails with UserError.
|
|
156
|
+
When a package contains multiple move lines, attempting to load only
|
|
157
|
+
some of those move lines should fail with a UserError.
|
|
158
|
+
"""
|
|
155
159
|
move1lines = self.move_product_out1.move_line_ids
|
|
156
160
|
move2lines = self.move_product_out2.move_line_ids
|
|
157
161
|
picking = self.move_product_out1.picking_id
|
|
162
|
+
|
|
163
|
+
self.move_product_out2.picking_id = picking
|
|
164
|
+
picking.action_assign()
|
|
165
|
+
move2lines = self.move_product_out2.move_line_ids
|
|
158
166
|
picking._put_in_pack(move1lines | move2lines)
|
|
159
|
-
self.
|
|
160
|
-
|
|
167
|
+
with self.assertRaisesRegex(UserError, "You cannot load this move line alone"):
|
|
168
|
+
move1lines._load_in_shipment(self.shipment_advice_out)
|
|
@@ -14,7 +14,7 @@ class TestShipmentPickingValues(Common):
|
|
|
14
14
|
def test_picking_loaded_waiting_quantity_yes(self):
|
|
15
15
|
move = self.move_product_out1
|
|
16
16
|
picking = move.picking_id
|
|
17
|
-
quantity = move.
|
|
18
|
-
move.
|
|
17
|
+
quantity = move.product_uom_qty
|
|
18
|
+
move.quantity = quantity - 3
|
|
19
19
|
self.load_records_in_shipment(self.shipment_advice_out, picking)
|
|
20
20
|
self.assertEqual(picking.loaded_waiting_quantity, 3)
|
|
@@ -18,7 +18,7 @@ class TestShipmentAdviceStockUser(Common):
|
|
|
18
18
|
def test_shipment_advice_button_open_planned_moves(self):
|
|
19
19
|
shipment_advice = self.shipment_advice_out.with_user(self.stock_user)
|
|
20
20
|
action = shipment_advice.button_open_planned_moves()
|
|
21
|
-
self.assertEqual(action["name"], "
|
|
21
|
+
self.assertEqual(action["name"], "Moves Analysis")
|
|
22
22
|
|
|
23
23
|
def test_shipment_advice_button_open_loaded_pickings(self):
|
|
24
24
|
shipment_advice = self.shipment_advice_out.with_user(self.stock_user)
|
|
@@ -27,13 +27,13 @@ class TestShipmentAdviceUnload(Common):
|
|
|
27
27
|
# Load move line
|
|
28
28
|
move_line = self.move_product_out1.move_line_ids
|
|
29
29
|
self.load_records_in_shipment(self.shipment_advice_out, move_line)
|
|
30
|
-
self.
|
|
30
|
+
self.assertTrue(move_line.picked)
|
|
31
31
|
self.assertEqual(
|
|
32
32
|
self.shipment_advice_out.loaded_move_line_without_package_ids, move_line
|
|
33
33
|
)
|
|
34
34
|
# Unload it
|
|
35
35
|
self.unload_records_from_shipment(self.shipment_advice_out, move_line)
|
|
36
|
-
self.assertFalse(move_line.
|
|
36
|
+
self.assertFalse(move_line.picked)
|
|
37
37
|
self.assertFalse(self.shipment_advice_out.loaded_move_line_without_package_ids)
|
|
38
38
|
|
|
39
39
|
def test_shipment_advice_unload_package_level(self):
|
|
@@ -42,8 +42,8 @@ class TestShipmentAdviceUnload(Common):
|
|
|
42
42
|
package_level = self.move_product_out2.move_line_ids.package_level_id
|
|
43
43
|
self.load_records_in_shipment(self.shipment_advice_out, package_level)
|
|
44
44
|
self.assertTrue(package_level.is_done)
|
|
45
|
-
self.
|
|
46
|
-
self.
|
|
45
|
+
self.assertTrue(self.move_product_out2.move_line_ids.picked)
|
|
46
|
+
self.assertTrue(self.move_product_out3.move_line_ids.picked)
|
|
47
47
|
self.assertFalse(self.shipment_advice_out.loaded_move_line_without_package_ids)
|
|
48
48
|
self.assertEqual(
|
|
49
49
|
self.shipment_advice_out.loaded_package_ids, package_level.package_id
|
|
@@ -51,6 +51,6 @@ class TestShipmentAdviceUnload(Common):
|
|
|
51
51
|
# Unload it
|
|
52
52
|
package_level._unload_from_shipment()
|
|
53
53
|
self.assertFalse(package_level.is_done)
|
|
54
|
-
self.assertFalse(self.move_product_out2.move_line_ids.
|
|
55
|
-
self.assertFalse(self.move_product_out3.move_line_ids.
|
|
54
|
+
self.assertFalse(self.move_product_out2.move_line_ids.picked)
|
|
55
|
+
self.assertFalse(self.move_product_out3.move_line_ids.picked)
|
|
56
56
|
self.assertFalse(self.shipment_advice_out.loaded_package_ids)
|
|
@@ -8,60 +8,55 @@
|
|
|
8
8
|
<field name="model">res.config.settings</field>
|
|
9
9
|
<field name="inherit_id" ref="stock.res_config_settings_view_form" />
|
|
10
10
|
<field name="arch" type="xml">
|
|
11
|
-
<xpath
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</div>
|
|
11
|
+
<xpath expr="//setting[@id='use_own_routes']" position="after">
|
|
12
|
+
<setting
|
|
13
|
+
id="shipment_advice_backorder_policy"
|
|
14
|
+
title="Backorder Policy for Outgoing Shipments"
|
|
15
|
+
help="Configure how outgoing shipment advice handles backorders for deliveries"
|
|
16
|
+
>
|
|
18
17
|
<div class="o_setting_right_pane">
|
|
19
18
|
<label for="shipment_advice_outgoing_backorder_policy" />
|
|
20
19
|
<div class="text-muted">
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
If you want that closing an outgoing shipment advice marks as
|
|
21
|
+
done all related deliveries and create backorder in case of
|
|
22
|
+
partial choose 'Create backorder'.
|
|
23
|
+
If you want to mark deliveries as done only when they are all
|
|
24
|
+
loaded in a shipment advice choose 'Leave open'. This last option
|
|
25
|
+
is useful when your deliveries will be shipped by several trucks.
|
|
26
|
+
</div>
|
|
28
27
|
<field name="shipment_advice_outgoing_backorder_policy" />
|
|
29
28
|
</div>
|
|
30
|
-
</
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
</setting>
|
|
30
|
+
|
|
31
|
+
<setting
|
|
33
32
|
id="shipment_advice_run_in_queue_job"
|
|
34
|
-
title="
|
|
33
|
+
title="Use Queue Jobs for Shipment Advice"
|
|
34
|
+
help="Process shipment advice validation through queued jobs to handle large shipments"
|
|
35
35
|
>
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
</div>
|
|
39
|
-
<div class="o_setting_right_pane">
|
|
40
|
-
<label for="shipment_advice_run_in_queue_job" />
|
|
36
|
+
<field name="shipment_advice_run_in_queue_job" />
|
|
37
|
+
<div class="content-group">
|
|
41
38
|
<div class="text-muted">
|
|
42
39
|
To prevent timeouts for large shipments, enable this option to execute
|
|
43
40
|
shipment advice validation through a queued job. Each picking will be
|
|
44
41
|
validated in a separate jobs.
|
|
45
42
|
</div>
|
|
46
43
|
</div>
|
|
47
|
-
</
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
</setting>
|
|
45
|
+
|
|
46
|
+
<setting
|
|
50
47
|
id="shipment_advice_auto_close_incoming"
|
|
51
|
-
title="
|
|
48
|
+
title="Auto-close Incoming Shipments"
|
|
49
|
+
help="Automatically close incoming shipment advice when all moves are completed"
|
|
52
50
|
>
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
</div>
|
|
56
|
-
<div class="o_setting_right_pane">
|
|
57
|
-
<label for="shipment_advice_auto_close_incoming" />
|
|
51
|
+
<field name="shipment_advice_auto_close_incoming" />
|
|
52
|
+
<div class="content-group">
|
|
58
53
|
<div class="text-muted">
|
|
59
54
|
This flag indicates if an incoming shipment advice
|
|
60
55
|
will be automatically set to done
|
|
61
56
|
if all related moves are done or canceled
|
|
62
57
|
</div>
|
|
63
58
|
</div>
|
|
64
|
-
</
|
|
59
|
+
</setting>
|
|
65
60
|
</xpath>
|
|
66
61
|
</field>
|
|
67
62
|
</record>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
date_stop="departure_date"
|
|
13
13
|
mode="week"
|
|
14
14
|
color="dock_id"
|
|
15
|
-
|
|
15
|
+
quick_create="0"
|
|
16
16
|
>
|
|
17
17
|
<field name="name" />
|
|
18
18
|
<field name="state" />
|
|
@@ -30,35 +30,35 @@
|
|
|
30
30
|
type="object"
|
|
31
31
|
string="Confirm"
|
|
32
32
|
class="btn-primary"
|
|
33
|
-
|
|
33
|
+
invisible="state != 'draft'"
|
|
34
34
|
/>
|
|
35
35
|
<button
|
|
36
36
|
name="action_in_progress"
|
|
37
37
|
type="object"
|
|
38
38
|
string="Start"
|
|
39
39
|
class="btn-primary"
|
|
40
|
-
|
|
40
|
+
invisible="state != 'confirmed'"
|
|
41
41
|
/>
|
|
42
42
|
<button
|
|
43
43
|
name="action_done"
|
|
44
44
|
type="object"
|
|
45
45
|
string="Mark as done"
|
|
46
46
|
class="btn-primary"
|
|
47
|
-
|
|
47
|
+
invisible="state not in ['in_progress','error']"
|
|
48
48
|
/>
|
|
49
49
|
<button
|
|
50
50
|
name="action_cancel"
|
|
51
51
|
type="object"
|
|
52
52
|
string="Cancel"
|
|
53
53
|
class="btn-secondary"
|
|
54
|
-
|
|
54
|
+
invisible="state not in ['in_progress','confirmed']"
|
|
55
55
|
/>
|
|
56
56
|
<button
|
|
57
57
|
name="action_draft"
|
|
58
58
|
type="object"
|
|
59
59
|
string="Back to draft"
|
|
60
60
|
class="btn-secondary"
|
|
61
|
-
|
|
61
|
+
invisible="state != 'cancel'"
|
|
62
62
|
/>
|
|
63
63
|
<field
|
|
64
64
|
name="state"
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
<div
|
|
70
70
|
class="alert alert-danger mb-0"
|
|
71
71
|
role="alert"
|
|
72
|
-
|
|
72
|
+
invisible="state != 'error'"
|
|
73
73
|
>
|
|
74
74
|
<field name="error_message" />
|
|
75
|
-
|
|
75
|
+
</div>
|
|
76
76
|
<sheet>
|
|
77
77
|
<div class="oe_button_box" name="button_box">
|
|
78
78
|
<button
|
|
@@ -80,8 +80,7 @@
|
|
|
80
80
|
type="object"
|
|
81
81
|
class="oe_stat_button"
|
|
82
82
|
icon="fa-truck"
|
|
83
|
-
|
|
84
|
-
attrs="{'invisible': [('planned_picking_ids', '=', [])]}"
|
|
83
|
+
invisible="not planned_picking_ids or state not in ['draft','confirmed']"
|
|
85
84
|
>
|
|
86
85
|
<field
|
|
87
86
|
string="Planned"
|
|
@@ -94,8 +93,7 @@
|
|
|
94
93
|
type="object"
|
|
95
94
|
class="oe_stat_button"
|
|
96
95
|
icon="fa-list"
|
|
97
|
-
|
|
98
|
-
attrs="{'invisible': [('planned_move_ids', '=', [])]}"
|
|
96
|
+
invisible="not planned_move_ids or state not in ['draft','confirmed']"
|
|
99
97
|
>
|
|
100
98
|
<field
|
|
101
99
|
string="Planned bulk"
|
|
@@ -108,8 +106,7 @@
|
|
|
108
106
|
type="object"
|
|
109
107
|
class="oe_stat_button"
|
|
110
108
|
icon="fa-truck"
|
|
111
|
-
|
|
112
|
-
attrs="{'invisible': ['|', ('shipment_type', '!=', 'outgoing'), ('loaded_picking_ids', '=', [])]}"
|
|
109
|
+
invisible="shipment_type != 'outgoing' or not loaded_picking_ids or state != 'in_progress'"
|
|
113
110
|
>
|
|
114
111
|
<field
|
|
115
112
|
string="Loaded"
|
|
@@ -122,8 +119,7 @@
|
|
|
122
119
|
type="object"
|
|
123
120
|
class="oe_stat_button"
|
|
124
121
|
icon="fa-list"
|
|
125
|
-
|
|
126
|
-
attrs="{'invisible': ['|', ('shipment_type', '!=', 'outgoing'), ('loaded_move_line_without_package_ids', '=', [])]}"
|
|
122
|
+
invisible="shipment_type != 'outgoing' or not loaded_move_line_without_package_ids or state != 'in_progress'"
|
|
127
123
|
>
|
|
128
124
|
<field
|
|
129
125
|
string="Loaded bulk"
|
|
@@ -136,8 +132,7 @@
|
|
|
136
132
|
type="object"
|
|
137
133
|
class="oe_stat_button"
|
|
138
134
|
icon="fa-cubes"
|
|
139
|
-
|
|
140
|
-
attrs="{'invisible': ['|', ('shipment_type', '!=', 'outgoing'), ('loaded_package_ids', '=', [])]}"
|
|
135
|
+
invisible="shipment_type != 'outgoing' or not loaded_package_ids or state != 'in_progress'"
|
|
141
136
|
>
|
|
142
137
|
<field
|
|
143
138
|
string="Loaded packages"
|
|
@@ -151,8 +146,7 @@
|
|
|
151
146
|
string="Loading Progress"
|
|
152
147
|
class="oe_stat_button"
|
|
153
148
|
icon="fa-tasks"
|
|
154
|
-
|
|
155
|
-
attrs="{'invisible': ['|', '|', ('shipment_type', '!=', 'outgoing'), ('loaded_picking_ids', '=', []), ('state', '!=', 'in_progress')]}"
|
|
149
|
+
invisible="shipment_type != 'outgoing' or not loaded_picking_ids or state != 'in_progress'"
|
|
156
150
|
/>
|
|
157
151
|
<button
|
|
158
152
|
name="button_open_receptions_in_progress"
|
|
@@ -160,79 +154,73 @@
|
|
|
160
154
|
string="Unloading Progress"
|
|
161
155
|
class="oe_stat_button"
|
|
162
156
|
icon="fa-tasks"
|
|
163
|
-
|
|
157
|
+
invisible="shipment_type != 'incoming' or not planned_picking_ids or state != 'in_progress'"
|
|
164
158
|
/>
|
|
165
159
|
</div>
|
|
166
160
|
<h1>
|
|
167
|
-
<field name="name"
|
|
161
|
+
<field name="name" invisible="name == '/'" />
|
|
168
162
|
</h1>
|
|
169
163
|
<group>
|
|
170
164
|
<group name="info1">
|
|
171
165
|
<field
|
|
172
166
|
name="warehouse_id"
|
|
167
|
+
readonly="state != 'draft'"
|
|
173
168
|
groups="stock.group_stock_multi_warehouses"
|
|
174
169
|
/>
|
|
175
|
-
<field
|
|
176
|
-
name="warehouse_id"
|
|
177
|
-
groups="!stock.group_stock_multi_warehouses"
|
|
178
|
-
invisible="1"
|
|
179
|
-
/>
|
|
180
170
|
<field
|
|
181
171
|
name="company_id"
|
|
182
172
|
groups="base.group_multi_company"
|
|
183
173
|
/>
|
|
184
|
-
<field
|
|
185
|
-
name="company_id"
|
|
186
|
-
groups="!base.group_multi_company"
|
|
187
|
-
invisible="1"
|
|
188
|
-
/>
|
|
189
|
-
<field
|
|
190
|
-
name="shipment_type"
|
|
191
|
-
attrs="{'readonly': [('name', '!=', '/')]}"
|
|
192
|
-
/>
|
|
174
|
+
<field name="shipment_type" readonly="name != '/'" />
|
|
193
175
|
</group>
|
|
194
176
|
<group name="info2">
|
|
195
177
|
<field
|
|
196
178
|
name="dock_id"
|
|
179
|
+
readonly="state not in ('draft', 'confirmed')"
|
|
197
180
|
domain="[('warehouse_id', '=', warehouse_id)]"
|
|
198
181
|
/>
|
|
199
|
-
<field
|
|
200
|
-
|
|
201
|
-
|
|
182
|
+
<field
|
|
183
|
+
name="arrival_date"
|
|
184
|
+
readonly="state not in ('draft', 'confirmed')"
|
|
185
|
+
/>
|
|
186
|
+
<field
|
|
187
|
+
name="departure_date"
|
|
188
|
+
readonly="state not in ('draft', 'in_progress', 'confirmed')"
|
|
189
|
+
/>
|
|
190
|
+
<field
|
|
191
|
+
name="ref"
|
|
192
|
+
readonly="state not in ('draft', 'in_progress', 'confirmed')"
|
|
193
|
+
/>
|
|
202
194
|
</group>
|
|
203
195
|
</group>
|
|
204
|
-
<field name="planned_picking_ids" invisible="1" />
|
|
205
|
-
<field name="planned_move_ids" invisible="1" />
|
|
206
|
-
<field name="loaded_picking_ids" invisible="1" />
|
|
207
|
-
<field name="loaded_package_ids" invisible="1" />
|
|
208
196
|
<notebook>
|
|
209
197
|
<page
|
|
210
198
|
string="Lading"
|
|
211
199
|
name="loaded_move_lines_without_package"
|
|
212
|
-
|
|
200
|
+
invisible="state in ['draft','confirmed']"
|
|
213
201
|
>
|
|
214
202
|
<span class="o_horizontal_separator">Bulk content</span>
|
|
215
203
|
<field
|
|
216
204
|
name="loaded_move_line_without_package_ids"
|
|
217
205
|
widget="many2many"
|
|
206
|
+
readonly="state not in ('draft', 'in_progress', 'confirmed')"
|
|
218
207
|
context="{'search_default_incoming': True if shipment_type == 'incoming' else False,
|
|
219
208
|
'search_default_outgoing': True if shipment_type == 'outgoing' else False}"
|
|
220
209
|
>
|
|
221
|
-
<
|
|
210
|
+
<list create="0">
|
|
222
211
|
<field name="picking_id" />
|
|
223
212
|
<field name="product_id" />
|
|
224
213
|
<field name="lot_id" />
|
|
225
|
-
<field name="
|
|
226
|
-
<field name="qty_done" />
|
|
214
|
+
<field name="picked" />
|
|
227
215
|
<field name="product_uom_id" />
|
|
228
216
|
<field name="state" />
|
|
229
|
-
</
|
|
217
|
+
</list>
|
|
230
218
|
</field>
|
|
231
219
|
<span class="o_horizontal_separator">Package content</span>
|
|
232
220
|
<field
|
|
233
221
|
name="loaded_package_level_ids"
|
|
234
222
|
nolabel="1"
|
|
235
|
-
context="{'
|
|
223
|
+
context="{'list_view_ref': 'shipment_advice.stock_package_level_limited_view_tree'}"
|
|
236
224
|
/>
|
|
237
225
|
</page>
|
|
238
226
|
<page name="carriers" string="Related shipping methods">
|
|
@@ -252,11 +240,7 @@
|
|
|
252
240
|
</strong>
|
|
253
241
|
</group>
|
|
254
242
|
</sheet>
|
|
255
|
-
<
|
|
256
|
-
<field name="message_follower_ids" widget="mail_followers" />
|
|
257
|
-
<field name="activity_ids" widget="mail_activity" />
|
|
258
|
-
<field name="message_ids" widget="mail_thread" />
|
|
259
|
-
</div>
|
|
243
|
+
<chatter />
|
|
260
244
|
</form>
|
|
261
245
|
</field>
|
|
262
246
|
</record>
|
|
@@ -264,7 +248,7 @@
|
|
|
264
248
|
<field name="name">shipment.advice.tree</field>
|
|
265
249
|
<field name="model">shipment.advice</field>
|
|
266
250
|
<field name="arch" type="xml">
|
|
267
|
-
<
|
|
251
|
+
<list
|
|
268
252
|
decoration-info="state == 'draft'"
|
|
269
253
|
decoration-muted="state == 'cancel'"
|
|
270
254
|
decoration-danger="state not in ('draft', 'cancel', 'done') and arrival_date < current_date"
|
|
@@ -282,13 +266,8 @@
|
|
|
282
266
|
/>
|
|
283
267
|
<!-- pylint: disable=duplicate-xml-fields -->
|
|
284
268
|
<field name="company_id" groups="base.group_multi_company" />
|
|
285
|
-
<field
|
|
286
|
-
name="company_id"
|
|
287
|
-
groups="!base.group_multi_company"
|
|
288
|
-
invisible="1"
|
|
289
|
-
/>
|
|
290
269
|
<field name="state" />
|
|
291
|
-
</
|
|
270
|
+
</list>
|
|
292
271
|
</field>
|
|
293
272
|
</record>
|
|
294
273
|
<record id="shipment_advice_view_search" model="ir.ui.view">
|
|
@@ -344,9 +323,8 @@
|
|
|
344
323
|
</record>
|
|
345
324
|
<record id="shipment_advice_action" model="ir.actions.act_window">
|
|
346
325
|
<field name="name">Shipment Advices</field>
|
|
347
|
-
<field name="type">ir.actions.act_window</field>
|
|
348
326
|
<field name="res_model">shipment.advice</field>
|
|
349
|
-
<field name="view_mode">calendar,
|
|
327
|
+
<field name="view_mode">calendar,list,form</field>
|
|
350
328
|
<field name="context">{'default_name': '/'}</field>
|
|
351
329
|
</record>
|
|
352
330
|
<record
|
|
@@ -360,7 +338,7 @@
|
|
|
360
338
|
</record>
|
|
361
339
|
<record id="shipment_advice_action_view_tree" model="ir.actions.act_window.view">
|
|
362
340
|
<field name="sequence" eval="2" />
|
|
363
|
-
<field name="view_mode">
|
|
341
|
+
<field name="view_mode">list</field>
|
|
364
342
|
<field name="view_id" ref="shipment_advice_view_tree" />
|
|
365
343
|
<field name="act_window_id" ref="shipment_advice_action" />
|
|
366
344
|
</record>
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
<field name="inherit_id" ref="stock.view_move_tree" />
|
|
9
9
|
<field name="arch" type="xml">
|
|
10
10
|
<field name="state" position="before">
|
|
11
|
-
<field
|
|
11
|
+
<field
|
|
12
|
+
name="shipment_advice_id"
|
|
13
|
+
readonly="state not in ('draft', 'in_progress', 'confirmed')"
|
|
14
|
+
/>
|
|
12
15
|
</field>
|
|
13
16
|
</field>
|
|
14
17
|
</record>
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
<field name="inherit_id" ref="stock.view_move_line_tree" />
|
|
9
9
|
<field name="arch" type="xml">
|
|
10
10
|
<field name="location_dest_id" position="after">
|
|
11
|
-
<field
|
|
11
|
+
<field
|
|
12
|
+
name="shipment_advice_id"
|
|
13
|
+
readonly="shipment_advice_id.state not in ('draft', 'in_progress', 'confirmed')"
|
|
14
|
+
/>
|
|
12
15
|
</field>
|
|
13
16
|
</field>
|
|
14
17
|
</record>
|
|
@@ -41,18 +44,17 @@
|
|
|
41
44
|
<field name="result_package_id" position="after">
|
|
42
45
|
<field
|
|
43
46
|
name="shipment_advice_id"
|
|
47
|
+
column_invisible="parent.picking_type_code != 'outgoing'"
|
|
44
48
|
optional="show"
|
|
45
|
-
attrs="{'column_invisible': [('parent.picking_type_code', '!=', 'outgoing')]}"
|
|
46
49
|
/>
|
|
47
50
|
</field>
|
|
48
51
|
<field name="product_uom_id" position="after">
|
|
49
|
-
<field name="picking_code" invisible="1" />
|
|
50
52
|
<button
|
|
51
53
|
name="button_load_in_shipment"
|
|
52
54
|
type="object"
|
|
53
55
|
icon="fa-truck"
|
|
54
56
|
title="Load in shipment"
|
|
55
|
-
|
|
57
|
+
invisible="shipment_advice_id or picking_code != 'outgoing'"
|
|
56
58
|
context="{'open_shipment': False}"
|
|
57
59
|
/>
|
|
58
60
|
</field>
|
|
@@ -64,14 +66,13 @@
|
|
|
64
66
|
<field name="priority" eval="100" />
|
|
65
67
|
<field name="arch" type="xml">
|
|
66
68
|
<!-- string="Products" -->
|
|
67
|
-
<
|
|
69
|
+
<list create="0">
|
|
68
70
|
<field name="picking_id" />
|
|
69
71
|
<field name="product_id" />
|
|
70
72
|
<field name="lot_id" />
|
|
71
|
-
<field name="
|
|
72
|
-
<field name="qty_done" />
|
|
73
|
+
<field name="picked" />
|
|
73
74
|
<field name="product_uom_id" />
|
|
74
|
-
</
|
|
75
|
+
</list>
|
|
75
76
|
</field>
|
|
76
77
|
</record>
|
|
77
78
|
</odoo>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<field name="location_dest_id" position="after">
|
|
11
11
|
<field
|
|
12
12
|
name="shipment_advice_id"
|
|
13
|
-
|
|
13
|
+
column_invisible="parent.picking_type_code != 'outgoing'"
|
|
14
14
|
/>
|
|
15
15
|
</field>
|
|
16
16
|
<field name="is_done" position="after">
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
type="object"
|
|
20
20
|
icon="fa-truck"
|
|
21
21
|
title="Load in shipment"
|
|
22
|
-
|
|
22
|
+
invisible="shipment_advice_id or parent.picking_type_code != 'outgoing'"
|
|
23
23
|
context="{'open_shipment': False}"
|
|
24
24
|
/>
|
|
25
25
|
</field>
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<field name="model">stock.package_level</field>
|
|
31
31
|
<field name="priority">2000</field>
|
|
32
32
|
<field name="arch" type="xml">
|
|
33
|
-
<
|
|
33
|
+
<list decoration-muted="state == 'done'" create="0">
|
|
34
34
|
<field name="picking_id" />
|
|
35
35
|
<field name="package_id" />
|
|
36
36
|
<field name="location_id" groups="stock.group_stock_multi_locations" />
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
<field name="state" />
|
|
42
42
|
<field name="is_done" />
|
|
43
43
|
<field name="package_shipping_weight" />
|
|
44
|
-
<field name="
|
|
45
|
-
</
|
|
44
|
+
<field name="package_shipping_weight_uom_name" string=" " />
|
|
45
|
+
</list>
|
|
46
46
|
</field>
|
|
47
47
|
</record>
|
|
48
48
|
</odoo>
|