odoo-addon-shipment-advice 16.0.1.7.2__py3-none-any.whl → 18.0.1.0.0.3__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/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.dist-info → odoo_addon_shipment_advice-18.0.1.0.0.3.dist-info}/METADATA +37 -36
- odoo_addon_shipment_advice-18.0.1.0.0.3.dist-info/RECORD +56 -0
- {odoo_addon_shipment_advice-16.0.1.7.2.dist-info → odoo_addon_shipment_advice-18.0.1.0.0.3.dist-info}/WHEEL +1 -1
- odoo_addon_shipment_advice-18.0.1.0.0.3.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.dist-info/RECORD +0 -57
- odoo_addon_shipment_advice-16.0.1.7.2.dist-info/top_level.txt +0 -1
- /odoo/addons/shipment_advice/readme/{DESCRIPTION.rst → DESCRIPTION.md} +0 -0
|
@@ -8,36 +8,32 @@
|
|
|
8
8
|
<field name="inherit_id" ref="stock.view_picking_form" />
|
|
9
9
|
<field name="arch" type="xml">
|
|
10
10
|
<header position="inside">
|
|
11
|
-
<field name="is_fully_loaded_in_shipment" invisible="1" />
|
|
12
11
|
<button
|
|
13
12
|
name="button_plan_in_shipment"
|
|
14
13
|
type="object"
|
|
15
14
|
string="Plan in shipment"
|
|
16
15
|
class="btn-primary"
|
|
17
|
-
|
|
16
|
+
invisible="planned_shipment_advice_id or picking_type_code != 'outgoing' or state in ('cancel', 'done')"
|
|
18
17
|
/>
|
|
19
18
|
<button
|
|
20
19
|
name="button_load_in_shipment"
|
|
21
20
|
type="object"
|
|
22
21
|
string="Load in shipment"
|
|
23
22
|
class="btn-primary"
|
|
24
|
-
|
|
23
|
+
invisible="is_fully_loaded_in_shipment or picking_type_code != 'outgoing' or state in ('cancel', 'done')"
|
|
25
24
|
/>
|
|
26
25
|
<button
|
|
27
26
|
name="button_unload_from_shipment"
|
|
28
27
|
type="object"
|
|
29
28
|
string="Unload from shipment"
|
|
30
29
|
class="btn-primary"
|
|
31
|
-
|
|
30
|
+
invisible="not is_fully_loaded_in_shipment or picking_type_code != 'outgoing' or state in ('cancel', 'done')"
|
|
32
31
|
/>
|
|
33
32
|
</header>
|
|
34
|
-
<xpath
|
|
35
|
-
expr="//field[@name='move_ids_without_package']/tree/button[@name='action_show_details']"
|
|
36
|
-
position="before"
|
|
37
|
-
>
|
|
33
|
+
<xpath expr="//field[@name='lot_ids']" position="after">
|
|
38
34
|
<field
|
|
39
35
|
name="shipment_advice_id"
|
|
40
|
-
|
|
36
|
+
column_invisible="parent.picking_type_code not in ['incoming', 'outgoing']"
|
|
41
37
|
optional="show"
|
|
42
38
|
/>
|
|
43
39
|
</xpath>
|
|
@@ -93,13 +89,13 @@
|
|
|
93
89
|
<field name="model">stock.picking</field>
|
|
94
90
|
<field name="priority">1000</field>
|
|
95
91
|
<field name="arch" type="xml">
|
|
96
|
-
<
|
|
92
|
+
<list create="0">
|
|
97
93
|
<field name="name" />
|
|
98
94
|
<field name="partner_id" />
|
|
99
95
|
<field name="scheduled_date" />
|
|
100
96
|
<field name="origin" />
|
|
101
97
|
<field name="state" />
|
|
102
|
-
</
|
|
98
|
+
</list>
|
|
103
99
|
</field>
|
|
104
100
|
</record>
|
|
105
101
|
<record id="stock_picking_loading_progress_view_tree" model="ir.ui.view">
|
|
@@ -107,21 +103,18 @@
|
|
|
107
103
|
<field name="model">stock.picking</field>
|
|
108
104
|
<field name="priority" eval="110" />
|
|
109
105
|
<field name="arch" type="xml">
|
|
110
|
-
<
|
|
106
|
+
<list
|
|
111
107
|
create="0"
|
|
112
108
|
decoration-success="is_fully_loaded_in_shipment"
|
|
113
109
|
decoration-warning="is_partially_loaded_in_shipment"
|
|
114
110
|
>
|
|
115
|
-
<field name="is_fully_loaded_in_shipment" invisible="1" />
|
|
116
|
-
<field name="is_partially_loaded_in_shipment" invisible="1" />
|
|
117
111
|
<field name="name" />
|
|
118
|
-
<field name="picking_type_code" invisible="1" />
|
|
119
112
|
<field name="loaded_packages_progress" />
|
|
120
113
|
<field name="loaded_move_lines_progress" />
|
|
121
114
|
<field name="loaded_weight_progress" />
|
|
122
115
|
<field name="state" />
|
|
123
116
|
<field name="loaded_waiting_quantity" />
|
|
124
|
-
</
|
|
117
|
+
</list>
|
|
125
118
|
</field>
|
|
126
119
|
</record>
|
|
127
120
|
<record id="wizard_plan_shipment_picking_action" model="ir.actions.act_window">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright 2021 Camptocamp SA
|
|
2
2
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
|
3
3
|
|
|
4
|
-
from odoo import
|
|
4
|
+
from odoo import api, fields, models
|
|
5
5
|
from odoo.exceptions import UserError
|
|
6
6
|
|
|
7
7
|
|
|
@@ -36,7 +36,7 @@ class WizardLoadInShipment(models.TransientModel):
|
|
|
36
36
|
active_ids = self.env.context.get("active_ids")
|
|
37
37
|
if not active_ids:
|
|
38
38
|
raise UserError(
|
|
39
|
-
_("Please select at least one record to load in a shipment.")
|
|
39
|
+
self.env._("Please select at least one record to load in a shipment.")
|
|
40
40
|
)
|
|
41
41
|
if active_model == "stock.picking" and active_ids:
|
|
42
42
|
res = self._default_get_from_stock_picking(res, active_ids)
|
|
@@ -55,12 +55,12 @@ class WizardLoadInShipment(models.TransientModel):
|
|
|
55
55
|
)
|
|
56
56
|
res["picking_ids"] = [(6, False, pickings_to_keep.ids)]
|
|
57
57
|
if not pickings_to_keep:
|
|
58
|
-
res["warning"] = _(
|
|
58
|
+
res["warning"] = self.env._(
|
|
59
59
|
"No transfer to load among selected ones (already done or "
|
|
60
60
|
"not qualified as delivery)."
|
|
61
61
|
)
|
|
62
62
|
elif pickings != pickings_to_keep:
|
|
63
|
-
res["warning"] = _(
|
|
63
|
+
res["warning"] = self.env._(
|
|
64
64
|
"Transfers to include have been updated, keeping only those "
|
|
65
65
|
"assigned and qualified as delivery."
|
|
66
66
|
)
|
|
@@ -79,7 +79,7 @@ class WizardLoadInShipment(models.TransientModel):
|
|
|
79
79
|
# We keep only deliveries not canceled/done
|
|
80
80
|
if not lines._check_entire_package():
|
|
81
81
|
raise UserError(
|
|
82
|
-
_(
|
|
82
|
+
self.env._(
|
|
83
83
|
"You cannot load move lines which are part of a package, "
|
|
84
84
|
"unless you select all the move lines related to this package."
|
|
85
85
|
)
|
|
@@ -92,12 +92,12 @@ class WizardLoadInShipment(models.TransientModel):
|
|
|
92
92
|
)
|
|
93
93
|
res["move_line_ids"] = [(6, False, lines_to_keep.ids)]
|
|
94
94
|
if not lines_to_keep:
|
|
95
|
-
res["warning"] = _(
|
|
95
|
+
res["warning"] = self.env._(
|
|
96
96
|
"No product to load among selected ones (already done or "
|
|
97
97
|
"not qualified as delivery)."
|
|
98
98
|
)
|
|
99
99
|
elif lines != lines_to_keep:
|
|
100
|
-
res["warning"] = _(
|
|
100
|
+
res["warning"] = self.env._(
|
|
101
101
|
"Lines to include have been updated, keeping only those "
|
|
102
102
|
"qualified as delivery."
|
|
103
103
|
)
|
|
@@ -118,12 +118,12 @@ class WizardLoadInShipment(models.TransientModel):
|
|
|
118
118
|
)
|
|
119
119
|
res["package_level_ids"] = [(6, False, package_levels_to_keep.ids)]
|
|
120
120
|
if not package_levels_to_keep:
|
|
121
|
-
res["warning"] = _(
|
|
121
|
+
res["warning"] = self.env._(
|
|
122
122
|
"No package to load among selected ones (already done or "
|
|
123
123
|
"not qualified as delivery)."
|
|
124
124
|
)
|
|
125
125
|
elif package_levels != package_levels_to_keep:
|
|
126
|
-
res["warning"] = _(
|
|
126
|
+
res["warning"] = self.env._(
|
|
127
127
|
"Packages to include have been updated, keeping only those "
|
|
128
128
|
"qualified as delivery."
|
|
129
129
|
)
|
|
@@ -146,8 +146,8 @@ class WizardLoadInShipment(models.TransientModel):
|
|
|
146
146
|
if self.picking_ids != pickings:
|
|
147
147
|
res.update(
|
|
148
148
|
warning={
|
|
149
|
-
"title": _("Transfers updated"),
|
|
150
|
-
"message": _(
|
|
149
|
+
"title": self.env._("Transfers updated"),
|
|
150
|
+
"message": self.env._(
|
|
151
151
|
"Transfers to load have been updated "
|
|
152
152
|
"to match the selected shipment type."
|
|
153
153
|
),
|
|
@@ -163,8 +163,8 @@ class WizardLoadInShipment(models.TransientModel):
|
|
|
163
163
|
if self.move_line_ids != lines:
|
|
164
164
|
res.update(
|
|
165
165
|
warning={
|
|
166
|
-
"title": _("Products updated"),
|
|
167
|
-
"message": _(
|
|
166
|
+
"title": self.env._("Products updated"),
|
|
167
|
+
"message": self.env._(
|
|
168
168
|
"Products to load have been updated "
|
|
169
169
|
"to match the selected shipment type."
|
|
170
170
|
),
|
|
@@ -180,8 +180,8 @@ class WizardLoadInShipment(models.TransientModel):
|
|
|
180
180
|
if self.package_level_ids != package_levels:
|
|
181
181
|
res.update(
|
|
182
182
|
warning={
|
|
183
|
-
"title": _("Packages updated"),
|
|
184
|
-
"message": _(
|
|
183
|
+
"title": self.env._("Packages updated"),
|
|
184
|
+
"message": self.env._(
|
|
185
185
|
"Packages to load have been updated "
|
|
186
186
|
"to match the selected shipment type."
|
|
187
187
|
),
|
|
@@ -8,44 +8,33 @@
|
|
|
8
8
|
<field name="arch" type="xml">
|
|
9
9
|
<form string="Load in Shipment Advice">
|
|
10
10
|
<strong style="color: red;">
|
|
11
|
-
<field
|
|
12
|
-
name="warning"
|
|
13
|
-
attrs="{'invisible': [('warning', '=', False)]}"
|
|
14
|
-
/>
|
|
11
|
+
<field name="warning" invisible="not warning" />
|
|
15
12
|
</strong>
|
|
16
|
-
<group
|
|
17
|
-
name="pickings"
|
|
18
|
-
attrs="{'invisible': [('picking_ids', '=', [])]}"
|
|
19
|
-
string="Transfers"
|
|
20
|
-
>
|
|
13
|
+
<group name="pickings" invisible="not picking_ids" string="Transfers">
|
|
21
14
|
<field
|
|
22
15
|
name="picking_ids"
|
|
23
|
-
context="{'
|
|
16
|
+
context="{'list_view_ref': 'shipment_advice.stock_picking_limited_view_tree'}"
|
|
24
17
|
/>
|
|
25
18
|
</group>
|
|
26
|
-
<group
|
|
27
|
-
name="products"
|
|
28
|
-
attrs="{'invisible': [('move_line_ids', '=', [])]}"
|
|
29
|
-
string="Products"
|
|
30
|
-
>
|
|
19
|
+
<group name="products" invisible="not move_line_ids" string="Products">
|
|
31
20
|
<field
|
|
32
21
|
name="move_line_ids"
|
|
33
|
-
context="{'
|
|
22
|
+
context="{'list_view_ref': 'shipment_advice.stock_move_line_limited_view_tree'}"
|
|
34
23
|
/>
|
|
35
24
|
</group>
|
|
36
25
|
<group
|
|
37
26
|
name="packages"
|
|
38
|
-
|
|
27
|
+
invisible="not package_level_ids"
|
|
39
28
|
string="Packages"
|
|
40
29
|
>
|
|
41
30
|
<field
|
|
42
31
|
name="package_level_ids"
|
|
43
|
-
context="{'
|
|
32
|
+
context="{'list_view_ref': 'shipment_advice.stock_package_level_limited_view_tree'}"
|
|
44
33
|
/>
|
|
45
34
|
</group>
|
|
46
35
|
<group
|
|
47
36
|
name="shipment"
|
|
48
|
-
|
|
37
|
+
invisible="not picking_ids and not move_line_ids and not package_level_ids"
|
|
49
38
|
>
|
|
50
39
|
<field name="shipment_advice_id" />
|
|
51
40
|
</group>
|
|
@@ -55,7 +44,7 @@
|
|
|
55
44
|
type="object"
|
|
56
45
|
string="Validate"
|
|
57
46
|
class="btn-primary"
|
|
58
|
-
|
|
47
|
+
invisible="not picking_ids and not move_line_ids and not package_level_ids"
|
|
59
48
|
/>
|
|
60
49
|
<button special="cancel" string="Cancel" class="btn-default" />
|
|
61
50
|
</footer>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright 2021 Camptocamp SA
|
|
2
2
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
|
3
3
|
|
|
4
|
-
from odoo import
|
|
4
|
+
from odoo import api, fields, models
|
|
5
5
|
from odoo.exceptions import UserError
|
|
6
6
|
|
|
7
7
|
|
|
@@ -33,7 +33,7 @@ class WizardPlanShipment(models.TransientModel):
|
|
|
33
33
|
active_ids = self.env.context.get("active_ids")
|
|
34
34
|
if not active_ids:
|
|
35
35
|
raise UserError(
|
|
36
|
-
_("Please select at least one record to plan in a shipment.")
|
|
36
|
+
self.env._("Please select at least one record to plan in a shipment.")
|
|
37
37
|
)
|
|
38
38
|
if active_model == "stock.picking" and active_ids:
|
|
39
39
|
res = self._default_get_from_stock_picking(res, active_ids)
|
|
@@ -53,12 +53,12 @@ class WizardPlanShipment(models.TransientModel):
|
|
|
53
53
|
)
|
|
54
54
|
res["picking_ids"] = [(6, False, pickings_to_keep.ids)]
|
|
55
55
|
if not pickings_to_keep:
|
|
56
|
-
res["warning"] = _(
|
|
56
|
+
res["warning"] = self.env._(
|
|
57
57
|
"No transfer to plan among selected ones (already done or "
|
|
58
58
|
"not qualified as deliveries/receptions)."
|
|
59
59
|
)
|
|
60
60
|
elif pickings != pickings_to_keep:
|
|
61
|
-
res["warning"] = _(
|
|
61
|
+
res["warning"] = self.env._(
|
|
62
62
|
"Transfers to include have been updated, keeping only those "
|
|
63
63
|
"still in progress and qualified as delivery/reception."
|
|
64
64
|
)
|
|
@@ -87,13 +87,13 @@ class WizardPlanShipment(models.TransientModel):
|
|
|
87
87
|
)
|
|
88
88
|
res["move_ids"] = [(6, False, moves_to_keep.ids)]
|
|
89
89
|
if not moves_to_keep:
|
|
90
|
-
res["warning"] = _(
|
|
90
|
+
res["warning"] = self.env._(
|
|
91
91
|
"No move to plan among selected ones (already done, "
|
|
92
92
|
"linked to other moves through a package, or not related "
|
|
93
93
|
"to a delivery/reception)."
|
|
94
94
|
)
|
|
95
95
|
elif moves != moves_to_keep:
|
|
96
|
-
res["warning"] = _(
|
|
96
|
+
res["warning"] = self.env._(
|
|
97
97
|
"Moves to include have been updated, keeping only those "
|
|
98
98
|
"still in progress and related to a delivery/reception."
|
|
99
99
|
)
|
|
@@ -113,8 +113,8 @@ class WizardPlanShipment(models.TransientModel):
|
|
|
113
113
|
if self.picking_ids != pickings:
|
|
114
114
|
res.update(
|
|
115
115
|
warning={
|
|
116
|
-
"title": _("Transfers updated"),
|
|
117
|
-
"message": _(
|
|
116
|
+
"title": self.env._("Transfers updated"),
|
|
117
|
+
"message": self.env._(
|
|
118
118
|
"Transfers to include have been updated "
|
|
119
119
|
"to match the selected shipment type."
|
|
120
120
|
),
|
|
@@ -123,8 +123,8 @@ class WizardPlanShipment(models.TransientModel):
|
|
|
123
123
|
if self.move_ids != moves:
|
|
124
124
|
res.update(
|
|
125
125
|
warning={
|
|
126
|
-
"title": _("Moves updated"),
|
|
127
|
-
"message": _(
|
|
126
|
+
"title": self.env._("Moves updated"),
|
|
127
|
+
"message": self.env._(
|
|
128
128
|
"Moves to include have been updated "
|
|
129
129
|
"to match the selected shipment type."
|
|
130
130
|
),
|
|
@@ -9,32 +9,22 @@
|
|
|
9
9
|
<form string="Plan in Shipment Advice">
|
|
10
10
|
<sheet>
|
|
11
11
|
<strong style="color: red;">
|
|
12
|
-
<field
|
|
13
|
-
name="warning"
|
|
14
|
-
attrs="{'invisible': [('warning', '=', False)]}"
|
|
15
|
-
/>
|
|
12
|
+
<field name="warning" invisible="not warning" />
|
|
16
13
|
</strong>
|
|
17
14
|
<group
|
|
18
15
|
name="pickings"
|
|
19
|
-
|
|
16
|
+
invisible="not picking_ids"
|
|
20
17
|
string="Transfers"
|
|
21
18
|
>
|
|
22
19
|
<field
|
|
23
20
|
name="picking_ids"
|
|
24
|
-
context="{'
|
|
21
|
+
context="{'list_view_ref': 'shipment_advice.stock_picking_limited_view_tree'}"
|
|
25
22
|
/>
|
|
26
23
|
</group>
|
|
27
|
-
<group
|
|
28
|
-
name="moves"
|
|
29
|
-
attrs="{'invisible': [('move_ids', '=', [])]}"
|
|
30
|
-
string="Moves"
|
|
31
|
-
>
|
|
24
|
+
<group name="moves" invisible="not move_ids" string="Moves">
|
|
32
25
|
<field name="move_ids" />
|
|
33
26
|
</group>
|
|
34
|
-
<group
|
|
35
|
-
name="shipment"
|
|
36
|
-
attrs="{'invisible': [('picking_ids', '=', []), ('move_ids', '=', [])]}"
|
|
37
|
-
>
|
|
27
|
+
<group name="shipment" invisible="not picking_ids and not move_ids">
|
|
38
28
|
<field name="shipment_advice_id" />
|
|
39
29
|
</group>
|
|
40
30
|
<footer>
|
|
@@ -43,7 +33,7 @@
|
|
|
43
33
|
type="object"
|
|
44
34
|
string="Validate"
|
|
45
35
|
class="btn-primary"
|
|
46
|
-
|
|
36
|
+
invisible="not picking_ids and not move_ids"
|
|
47
37
|
/>
|
|
48
38
|
<button special="cancel" string="Cancel" class="btn-default" />
|
|
49
39
|
</footer>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright 2021 Camptocamp SA
|
|
2
2
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
|
3
3
|
|
|
4
|
-
from odoo import
|
|
4
|
+
from odoo import api, fields, models
|
|
5
5
|
from odoo.exceptions import UserError
|
|
6
6
|
|
|
7
7
|
|
|
@@ -26,7 +26,7 @@ class WizardUnloadShipment(models.TransientModel):
|
|
|
26
26
|
active_ids = self.env.context.get("active_ids")
|
|
27
27
|
if not active_ids:
|
|
28
28
|
raise UserError(
|
|
29
|
-
_("Please select at least one record to unload from shipment.")
|
|
29
|
+
self.env._("Please select at least one record to unload from shipment.")
|
|
30
30
|
)
|
|
31
31
|
if active_model == "stock.picking" and active_ids:
|
|
32
32
|
res = self._default_get_from_stock_picking(res, active_ids)
|
|
@@ -51,12 +51,12 @@ class WizardUnloadShipment(models.TransientModel):
|
|
|
51
51
|
)
|
|
52
52
|
res["picking_ids"] = [(6, False, pickings_to_keep.ids)]
|
|
53
53
|
if not pickings_to_keep:
|
|
54
|
-
res["warning"] = _(
|
|
54
|
+
res["warning"] = self.env._(
|
|
55
55
|
"No transfer to unload among selected ones (already done or "
|
|
56
56
|
"not related to a shipment)."
|
|
57
57
|
)
|
|
58
58
|
elif pickings != pickings_to_keep:
|
|
59
|
-
res["warning"] = _(
|
|
59
|
+
res["warning"] = self.env._(
|
|
60
60
|
"Transfers to include have been updated, keeping only those "
|
|
61
61
|
"still in progress and related to a shipment."
|
|
62
62
|
)
|
|
@@ -79,12 +79,12 @@ class WizardUnloadShipment(models.TransientModel):
|
|
|
79
79
|
)
|
|
80
80
|
res["move_line_ids"] = [(6, False, lines_to_keep.ids)]
|
|
81
81
|
if not lines_to_keep:
|
|
82
|
-
res["warning"] = _(
|
|
82
|
+
res["warning"] = self.env._(
|
|
83
83
|
"No product to unload among selected ones (already done or "
|
|
84
84
|
"not related to a shipment)."
|
|
85
85
|
)
|
|
86
86
|
elif lines != lines_to_keep:
|
|
87
|
-
res["warning"] = _(
|
|
87
|
+
res["warning"] = self.env._(
|
|
88
88
|
"Products to include have been updated, keeping only those "
|
|
89
89
|
"still in progress and related to a shipment."
|
|
90
90
|
)
|
|
@@ -8,19 +8,12 @@
|
|
|
8
8
|
<field name="arch" type="xml">
|
|
9
9
|
<form string="Unload from Shipment Advice">
|
|
10
10
|
<strong style="color: red;">
|
|
11
|
-
<field
|
|
12
|
-
name="warning"
|
|
13
|
-
attrs="{'invisible': [('warning', '=', False)]}"
|
|
14
|
-
/>
|
|
11
|
+
<field name="warning" invisible="not warning" />
|
|
15
12
|
</strong>
|
|
16
|
-
<group
|
|
17
|
-
name="pickings"
|
|
18
|
-
attrs="{'invisible': [('picking_ids', '=', [])]}"
|
|
19
|
-
string="Transfers"
|
|
20
|
-
>
|
|
13
|
+
<group name="pickings" invisible="not picking_ids" string="Transfers">
|
|
21
14
|
<field
|
|
22
15
|
name="picking_ids"
|
|
23
|
-
context="{'
|
|
16
|
+
context="{'list_view_ref': 'shipment_advice.stock_picking_limited_view_tree'}"
|
|
24
17
|
/>
|
|
25
18
|
</group>
|
|
26
19
|
<footer>
|
|
@@ -29,7 +22,7 @@
|
|
|
29
22
|
type="object"
|
|
30
23
|
string="Validate"
|
|
31
24
|
class="btn-primary"
|
|
32
|
-
|
|
25
|
+
invisible="not picking_ids"
|
|
33
26
|
/>
|
|
34
27
|
<button special="cancel" string="Cancel" class="btn-default" />
|
|
35
28
|
</footer>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright 2021 Camptocamp SA
|
|
2
2
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
|
3
3
|
|
|
4
|
-
from odoo import
|
|
4
|
+
from odoo import api, fields, models
|
|
5
5
|
from odoo.exceptions import UserError
|
|
6
6
|
|
|
7
7
|
|
|
@@ -27,7 +27,7 @@ class WizardUnplanShipment(models.TransientModel):
|
|
|
27
27
|
active_ids = self.env.context.get("active_ids")
|
|
28
28
|
if not active_ids:
|
|
29
29
|
raise UserError(
|
|
30
|
-
_("Please select at least one record to unplan from shipment.")
|
|
30
|
+
self.env._("Please select at least one record to unplan from shipment.")
|
|
31
31
|
)
|
|
32
32
|
if active_model == "stock.picking" and active_ids:
|
|
33
33
|
res = self._default_get_from_stock_picking(res, active_ids)
|
|
@@ -52,12 +52,12 @@ class WizardUnplanShipment(models.TransientModel):
|
|
|
52
52
|
)
|
|
53
53
|
res["picking_ids"] = [(6, False, pickings_to_keep.ids)]
|
|
54
54
|
if not pickings_to_keep:
|
|
55
|
-
res["warning"] = _(
|
|
55
|
+
res["warning"] = self.env._(
|
|
56
56
|
"No transfer to unplan among selected ones (already done or "
|
|
57
57
|
"not related to a shipment)."
|
|
58
58
|
)
|
|
59
59
|
elif pickings != pickings_to_keep:
|
|
60
|
-
res["warning"] = _(
|
|
60
|
+
res["warning"] = self.env._(
|
|
61
61
|
"Transfers to include have been updated, keeping only those "
|
|
62
62
|
"still in progress and related to a shipment."
|
|
63
63
|
)
|
|
@@ -87,13 +87,13 @@ class WizardUnplanShipment(models.TransientModel):
|
|
|
87
87
|
)
|
|
88
88
|
res["move_ids"] = [(6, False, moves_to_keep.ids)]
|
|
89
89
|
if not moves_to_keep:
|
|
90
|
-
res["warning"] = _(
|
|
90
|
+
res["warning"] = self.env._(
|
|
91
91
|
"No move to unplan among selected ones (already done, "
|
|
92
92
|
"linked to other moves through a package, or not related "
|
|
93
93
|
"to a shipment)."
|
|
94
94
|
)
|
|
95
95
|
elif moves != moves_to_keep:
|
|
96
|
-
res["warning"] = _(
|
|
96
|
+
res["warning"] = self.env._(
|
|
97
97
|
"Moves to include have been updated, keeping only those "
|
|
98
98
|
"still in progress and related to a shipment."
|
|
99
99
|
)
|
|
@@ -8,26 +8,15 @@
|
|
|
8
8
|
<field name="arch" type="xml">
|
|
9
9
|
<form string="Unplan from Shipment Advice">
|
|
10
10
|
<strong style="color: red;">
|
|
11
|
-
<field
|
|
12
|
-
name="warning"
|
|
13
|
-
attrs="{'invisible': [('warning', '=', False)]}"
|
|
14
|
-
/>
|
|
11
|
+
<field name="warning" invisible="not warning" />
|
|
15
12
|
</strong>
|
|
16
|
-
<group
|
|
17
|
-
name="pickings"
|
|
18
|
-
attrs="{'invisible': [('picking_ids', '=', [])]}"
|
|
19
|
-
string="Transfers"
|
|
20
|
-
>
|
|
13
|
+
<group name="pickings" invisible="not picking_ids" string="Transfers">
|
|
21
14
|
<field
|
|
22
15
|
name="picking_ids"
|
|
23
|
-
context="{'
|
|
16
|
+
context="{'list_view_ref': 'shipment_advice.stock_picking_limited_view_tree'}"
|
|
24
17
|
/>
|
|
25
18
|
</group>
|
|
26
|
-
<group
|
|
27
|
-
name="moves"
|
|
28
|
-
attrs="{'invisible': [('move_ids', '=', [])]}"
|
|
29
|
-
string="Moves"
|
|
30
|
-
>
|
|
19
|
+
<group name="moves" invisible="not move_ids" string="Moves">
|
|
31
20
|
<field name="move_ids" />
|
|
32
21
|
</group>
|
|
33
22
|
<footer>
|
|
@@ -36,7 +25,7 @@
|
|
|
36
25
|
type="object"
|
|
37
26
|
string="Validate"
|
|
38
27
|
class="btn-primary"
|
|
39
|
-
|
|
28
|
+
invisible="not picking_ids and not move_ids"
|
|
40
29
|
/>
|
|
41
30
|
<button special="cancel" string="Cancel" class="btn-default" />
|
|
42
31
|
</footer>
|