odoo-addon-stock-barcodes 16.0.1.1.0.8__py3-none-any.whl → 16.0.2.0.0__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/stock_barcodes/README.rst +217 -12
- odoo/addons/stock_barcodes/__init__.py +1 -0
- odoo/addons/stock_barcodes/__manifest__.py +8 -3
- odoo/addons/stock_barcodes/data/stock_barcodes_action.xml +8 -0
- odoo/addons/stock_barcodes/data/stock_barcodes_option.xml +99 -1
- odoo/addons/stock_barcodes/i18n/stock_barcodes.pot +268 -79
- odoo/addons/stock_barcodes/i18n/tr.po +326 -276
- odoo/addons/stock_barcodes/models/__init__.py +1 -0
- odoo/addons/stock_barcodes/models/barcode_events_mixin.py +11 -0
- odoo/addons/stock_barcodes/models/stock_barcodes_action.py +137 -3
- odoo/addons/stock_barcodes/models/stock_picking.py +17 -2
- odoo/addons/stock_barcodes/models/stock_picking_type.py +35 -0
- odoo/addons/stock_barcodes/models/stock_quant.py +51 -1
- odoo/addons/stock_barcodes/readme/CONTRIBUTORS.rst +4 -0
- odoo/addons/stock_barcodes/readme/DESCRIPTION.rst +4 -0
- odoo/addons/stock_barcodes/readme/HISTORY.rst +12 -0
- odoo/addons/stock_barcodes/readme/USAGE.rst +191 -10
- odoo/addons/stock_barcodes/reports/__init__.py +1 -0
- odoo/addons/stock_barcodes/reports/barcode_actions_report.py +16 -0
- odoo/addons/stock_barcodes/reports/barcode_actions_report.xml +25 -0
- odoo/addons/stock_barcodes/reports/reports.xml +28 -0
- odoo/addons/stock_barcodes/static/description/index.html +189 -33
- odoo/addons/stock_barcodes/static/src/docs/barcodes_actions.pdf +0 -0
- odoo/addons/stock_barcodes/static/src/docs/barcodes_demo.pdf +0 -0
- odoo/addons/stock_barcodes/static/src/img/add_product.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/apply_inventory.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/apply_inventory_reason.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/barcode_interface_picking.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/confirm_all_quantity_items_picking.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/confirm_items_picking.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/create_barcode_action.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/form_add_product.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/form_add_product_quantity.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/form_add_product_reset.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/inventory_barcode_action.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/list_action_items.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/list_items.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/list_items_picking.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/list_items_picking_edit.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/list_items_picking_quantity.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/list_items_picking_scanned.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/list_picking.png +0 -0
- odoo/addons/stock_barcodes/static/src/img/print_barcodes.png +0 -0
- odoo/addons/stock_barcodes/static/src/scss/barcode.scss +135 -0
- odoo/addons/stock_barcodes/static/src/scss/stock.scss +285 -0
- odoo/addons/stock_barcodes/static/src/utils/barcodes_models_utils.esm.js +1 -0
- odoo/addons/stock_barcodes/static/src/views/actions/stock_barcode_main_menu.esm.js +88 -0
- odoo/addons/stock_barcodes/static/src/views/actions/stock_barcode_main_menu.scss +74 -0
- odoo/addons/stock_barcodes/static/src/views/actions/stock_barcode_main_menu.xml +45 -0
- odoo/addons/stock_barcodes/static/src/views/form/form_controller.esm.js +71 -0
- odoo/addons/stock_barcodes/static/src/views/form/form_view.esm.js +14 -0
- odoo/addons/stock_barcodes/static/src/views/kanban/kanban_record.esm.js +27 -0
- odoo/addons/stock_barcodes/static/src/views/{kanban_renderer.esm.js → kanban/kanban_renderer.esm.js} +78 -27
- odoo/addons/stock_barcodes/static/src/views/kanban/kanban_view.esm.js +8 -0
- odoo/addons/stock_barcodes/static/src/views/kanban/stock_barcodes_kanban.xml +28 -0
- odoo/addons/stock_barcodes/static/src/views/views.esm.js +35 -7
- odoo/addons/stock_barcodes/static/src/widgets/boolean_toggle.esm.js +46 -0
- odoo/addons/stock_barcodes/tests/common.py +25 -0
- odoo/addons/stock_barcodes/tests/test_stock_barcodes.py +65 -1
- odoo/addons/stock_barcodes/tests/test_stock_barcodes_picking.py +97 -13
- odoo/addons/stock_barcodes/views/stock_barcodes_action_view.xml +83 -9
- odoo/addons/stock_barcodes/views/stock_barcodes_menu.xml +1 -1
- odoo/addons/stock_barcodes/views/stock_picking_views.xml +29 -10
- odoo/addons/stock_barcodes/wizard/__init__.py +1 -0
- odoo/addons/stock_barcodes/wizard/stock_barcodes_candidate_picking.py +148 -0
- odoo/addons/stock_barcodes/wizard/stock_barcodes_read.py +148 -55
- odoo/addons/stock_barcodes/wizard/stock_barcodes_read_inventory.py +30 -2
- odoo/addons/stock_barcodes/wizard/stock_barcodes_read_inventory_views.xml +101 -92
- odoo/addons/stock_barcodes/wizard/stock_barcodes_read_picking.py +77 -141
- odoo/addons/stock_barcodes/wizard/stock_barcodes_read_picking_views.xml +197 -219
- odoo/addons/stock_barcodes/wizard/stock_barcodes_read_todo.py +45 -0
- odoo/addons/stock_barcodes/wizard/stock_barcodes_read_views.xml +87 -170
- odoo_addon_stock_barcodes-16.0.2.0.0.dist-info/METADATA +435 -0
- odoo_addon_stock_barcodes-16.0.2.0.0.dist-info/RECORD +103 -0
- odoo/addons/stock_barcodes/static/src/css/stock.scss +0 -136
- odoo/addons/stock_barcodes/static/src/views/form_view.esm.js +0 -17
- odoo_addon_stock_barcodes-16.0.1.1.0.8.dist-info/METADATA +0 -230
- odoo_addon_stock_barcodes-16.0.1.1.0.8.dist-info/RECORD +0 -68
- {odoo_addon_stock_barcodes-16.0.1.1.0.8.dist-info → odoo_addon_stock_barcodes-16.0.2.0.0.dist-info}/WHEEL +0 -0
- {odoo_addon_stock_barcodes-16.0.1.1.0.8.dist-info → odoo_addon_stock_barcodes-16.0.2.0.0.dist-info}/top_level.txt +0 -0
@@ -6,11 +6,50 @@
|
|
6
6
|
<field name="inherit_id" ref="stock_barcodes.view_stock_barcodes_read_form" />
|
7
7
|
<field name="mode">primary</field>
|
8
8
|
<field name="arch" type="xml">
|
9
|
+
<xpath expr="//button[@name='open_actions']" position="after">
|
10
|
+
<button
|
11
|
+
name="action_open_picking"
|
12
|
+
type="object"
|
13
|
+
class="btn btn-primary"
|
14
|
+
data-hotkey="'shift+o'"
|
15
|
+
>
|
16
|
+
<field name="picking_id" />
|
17
|
+
</button>
|
18
|
+
<t t-if="partner_id">
|
19
|
+
[<field
|
20
|
+
name="partner_id"
|
21
|
+
invisible="context.get('hide_partner', False)"
|
22
|
+
/>]
|
23
|
+
</t>
|
24
|
+
<field name="candidate_picking_id" invisible="1" />
|
25
|
+
|
26
|
+
<button
|
27
|
+
name="action_unlock_picking"
|
28
|
+
type="object"
|
29
|
+
title="unlock picking"
|
30
|
+
attrs="{'invisible': [('candidate_picking_id', '=', 'picking_id')]}"
|
31
|
+
class="float-end"
|
32
|
+
>
|
33
|
+
<span class="fa-stack fa-lg">
|
34
|
+
<!-- FIXME: Use fa-thumbtack fa-stack-2x on v13 with FA v5.4 -->
|
35
|
+
<i class="fa fa-thumb-tack fa-stack-1x" />
|
36
|
+
<!-- FIXME: Use fa-slash on v13 with FA v5.4 -->
|
37
|
+
<i class="fa fa-ban fa-stack-2x" />
|
38
|
+
</span>
|
39
|
+
</button>
|
40
|
+
<button
|
41
|
+
name="action_lock_picking"
|
42
|
+
type="object"
|
43
|
+
title="lock picking"
|
44
|
+
attrs="{'invisible': [('candidate_picking_id', '!=', 'picking_id')]}"
|
45
|
+
class="fa fa-thumb-tack fa-2x float-end"
|
46
|
+
/>
|
47
|
+
</xpath>
|
9
48
|
<xpath expr="//field[@name='message_type']" position="before">
|
10
49
|
<field
|
11
50
|
name="candidate_picking_ids"
|
12
|
-
mode="kanban"
|
13
51
|
attrs="{'invisible': [('candidate_picking_ids', '=', [])]}"
|
52
|
+
mode="kanban"
|
14
53
|
nolabel="1"
|
15
54
|
force_save="1"
|
16
55
|
class="o_x2m_control_panel"
|
@@ -32,88 +71,22 @@
|
|
32
71
|
<templates>
|
33
72
|
<t t-name="kanban-box">
|
34
73
|
<div
|
74
|
+
t-if="!widget.isHtmlEmpty(record.note.raw_value)"
|
35
75
|
t-att-class="'oe_kanban_color_alert' + (record.is_pending.raw_value == false ? ' bg-success' : '')"
|
36
76
|
>
|
37
|
-
<div>
|
38
|
-
<
|
39
|
-
name="
|
40
|
-
|
41
|
-
|
42
|
-
t-if="record.picking_id.raw_value != record.wiz_picking_id.raw_value"
|
43
|
-
class="fa fa-thumb-tack fa-2x float-end"
|
44
|
-
context="{'wiz_barcode_id': parent.id, 'picking_id': picking_id}"
|
77
|
+
<div class="oe_kanban_details p-2">
|
78
|
+
<field
|
79
|
+
name="scan_count"
|
80
|
+
invisible="1"
|
81
|
+
force_save="1"
|
45
82
|
/>
|
46
|
-
<
|
47
|
-
|
48
|
-
type="object"
|
49
|
-
title="unlock picking"
|
50
|
-
class="float-end"
|
51
|
-
t-if="record.picking_id.raw_value == record.wiz_picking_id.raw_value"
|
52
|
-
context="{'wiz_barcode_id': parent.id}"
|
83
|
+
<div
|
84
|
+
class="fw-bold text-center text-danger fst-italic"
|
53
85
|
>
|
54
|
-
<
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
/>
|
59
|
-
<!-- FIXME: Use fa-slash on v13 with FA v5.4 -->
|
60
|
-
<i class="fa fa-ban fa-stack-2x" />
|
61
|
-
</span>
|
62
|
-
</a>
|
63
|
-
</div>
|
64
|
-
<div>
|
65
|
-
</div>
|
66
|
-
<div class="oe_kanban_details">
|
67
|
-
<div>
|
68
|
-
<strong>
|
69
|
-
<field name="name" />
|
70
|
-
<t t-if="record.partner_id.raw_value">
|
71
|
-
[<field
|
72
|
-
name="partner_id"
|
73
|
-
invisible="context.get('hide_partner', False)"
|
74
|
-
/>]
|
75
|
-
</t>
|
76
|
-
<field
|
77
|
-
name="scan_count"
|
78
|
-
invisible="1"
|
79
|
-
force_save="1"
|
80
|
-
/>
|
81
|
-
</strong>
|
82
|
-
</div>
|
83
|
-
<t
|
84
|
-
t-if="!widget.isHtmlEmpty(record.note.raw_value)"
|
85
|
-
>
|
86
|
-
<div
|
87
|
-
class="fw-bold text-center text-danger fst-italic"
|
88
|
-
>
|
89
|
-
<t
|
90
|
-
t-out="record.note.value"
|
91
|
-
invisible="context.get('hide_note', False)"
|
92
|
-
/>
|
93
|
-
</div>
|
94
|
-
</t>
|
95
|
-
<div class="row">
|
96
|
-
<div class="col">
|
97
|
-
<button
|
98
|
-
name="action_open_picking"
|
99
|
-
type="object"
|
100
|
-
class="float-start btn btn-secondary border"
|
101
|
-
context="{'wiz_barcode_id': parent.id, 'picking_id': picking_id}"
|
102
|
-
data-hotkey="'shift+o'"
|
103
|
-
>Open</button>
|
104
|
-
</div>
|
105
|
-
<div class="col">
|
106
|
-
<!-- FIXME: Fix confirm question -->
|
107
|
-
<button
|
108
|
-
name="action_validate_picking"
|
109
|
-
type="object"
|
110
|
-
t-att-class="'btn float-end' + (record.is_pending.raw_value == false ? ' btn-primary' : ' btn-secondary border')"
|
111
|
-
attrs="{'invisible': [('state', 'not in', ['draft', 'assigned', 'confirmed'])]}"
|
112
|
-
confirm="Are you sure to validate the picking ?"
|
113
|
-
context="{'wiz_barcode_id': parent.id, 'picking_id': picking_id}"
|
114
|
-
data-hotkey="'shift+v'"
|
115
|
-
>Validate</button>
|
116
|
-
</div>
|
86
|
+
<t
|
87
|
+
t-out="record.note.value"
|
88
|
+
invisible="context.get('hide_note', False)"
|
89
|
+
/>
|
117
90
|
</div>
|
118
91
|
</div>
|
119
92
|
</div>
|
@@ -141,18 +114,21 @@
|
|
141
114
|
<field name="location_id" position="attributes">
|
142
115
|
<attribute
|
143
116
|
name="domain"
|
144
|
-
>[('id', 'child_of', picking_location_id), '|', ('company_id', '=', False), ('company_id', '=',
|
117
|
+
>[('id', 'child_of', picking_location_id), '|', ('company_id', '=', False), ('company_id', '=',
|
118
|
+
company_id), ('usage', '!=', 'view')]
|
119
|
+
</attribute>
|
145
120
|
</field>
|
146
121
|
<group name="location" position="attributes">
|
147
122
|
<attribute
|
148
123
|
name="attrs"
|
149
|
-
>{'readonly': [('manual_entry', '=', False)], 'invisible': [('picking_type_code', '=', 'incoming')]}
|
124
|
+
>{'readonly': [('manual_entry', '=', False)], 'invisible': [('picking_type_code', '=', 'incoming')]}
|
125
|
+
</attribute>
|
150
126
|
</group>
|
151
127
|
<group name="location" position="after">
|
152
128
|
<div attrs="{'invisible': [('picking_type_code', '=', 'outgoing')]}">
|
153
129
|
<strong class=" d-none d-sm-block">Dest. Location</strong>
|
154
130
|
<span
|
155
|
-
class="fa fa-share text-center d-sm-none oe_span_small_icon"
|
131
|
+
class="fa fa-2x fa-share text-center d-sm-none oe_span_small_icon"
|
156
132
|
title="Destination Location"
|
157
133
|
/>
|
158
134
|
<field
|
@@ -171,12 +147,22 @@
|
|
171
147
|
<!-- hide group scan_fields for extra todo lines -->
|
172
148
|
<attribute
|
173
149
|
name="attrs"
|
174
|
-
>{'invisible': [('todo_line_is_extra_line', '!=', False)]}
|
150
|
+
>{'invisible': [('todo_line_is_extra_line', '!=', False)]}
|
151
|
+
</attribute>
|
175
152
|
</group>
|
176
153
|
<group name="scan_fields" position="after">
|
154
|
+
<div
|
155
|
+
attrs="{'invisible': [('picking_state', '!=', 'done')]}"
|
156
|
+
class="oe_kanban_picking_done bg-dark d-flex flex-column justify-content-center align-items-center text-white"
|
157
|
+
>
|
158
|
+
<span class="fa fa-6x mb-4 fa-exclamation-triangle" />
|
159
|
+
<span class="fa fa-2x fa-exclamation-triangle">
|
160
|
+
This picking is already done
|
161
|
+
</span>
|
162
|
+
</div>
|
177
163
|
<group
|
178
164
|
string="Pending moves"
|
179
|
-
attrs="{'invisible': [('pending_move_ids', '=', [])]}"
|
165
|
+
attrs="{'invisible': ['|', ('picking_state', '=', 'done'), ('pending_move_ids', '=', [])]}"
|
180
166
|
col="2"
|
181
167
|
>
|
182
168
|
<field
|
@@ -185,78 +171,66 @@
|
|
185
171
|
nolabel="1"
|
186
172
|
colspan="2"
|
187
173
|
force_save="1"
|
188
|
-
mode="
|
174
|
+
mode="kanban"
|
189
175
|
>
|
190
|
-
<tree decoration-warning="is_extra_line">
|
191
|
-
<field name="state" invisible="1" />
|
192
|
-
<field name="is_extra_line" invisible="1" />
|
193
|
-
<field name="product_id" />
|
194
|
-
<field name="product_uom_qty" />
|
195
|
-
<field name="line_ids" invisible="1" />
|
196
|
-
<field name="location_id" optional="hide" />
|
197
|
-
<field name="location_dest_id" optional="hide" />
|
198
|
-
<field
|
199
|
-
name="lot_id"
|
200
|
-
groups="stock.group_production_lot"
|
201
|
-
optional="hide"
|
202
|
-
/>
|
203
|
-
<field
|
204
|
-
name="package_id"
|
205
|
-
groups="stock.group_tracking_lot"
|
206
|
-
optional="hide"
|
207
|
-
/>
|
208
|
-
<field name="qty_done" />
|
209
|
-
<button
|
210
|
-
name="fill_from_pending_line"
|
211
|
-
title="Fill from pending line"
|
212
|
-
type="object"
|
213
|
-
class="btn"
|
214
|
-
icon="fa-upload"
|
215
|
-
context="{'wiz_barcode_id': parent.id}"
|
216
|
-
/>
|
217
|
-
</tree>
|
218
176
|
<kanban class="o_kanban_mobile">
|
177
|
+
<field name="id" />
|
219
178
|
<field name="state" />
|
220
179
|
<field name="product_id" />
|
221
180
|
<field name="product_uom_qty" />
|
222
181
|
<field name="qty_done" />
|
182
|
+
<field name="qty_done_rest" />
|
183
|
+
<field name="uom_id" />
|
184
|
+
<field name="product_qty_reserved" />
|
185
|
+
<field name="picking_state" />
|
223
186
|
<templates>
|
224
187
|
<t t-name="kanban-box">
|
225
|
-
<div
|
188
|
+
<div class="oe_kanban_global_click">
|
226
189
|
<div class="row">
|
227
|
-
<div class="col-
|
228
|
-
<
|
229
|
-
|
230
|
-
|
231
|
-
</span>
|
232
|
-
</strong>
|
233
|
-
</div>
|
234
|
-
<div class="col-2">
|
235
|
-
<span
|
236
|
-
class="float-end text-end text-muted"
|
190
|
+
<div class="col-8 col-md-8">
|
191
|
+
<field name="product_id" class="h2" />
|
192
|
+
<div
|
193
|
+
class="d-flex justify-content-start align-items-center indent h4 pt-3"
|
237
194
|
>
|
238
|
-
<
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
<
|
247
|
-
|
195
|
+
<span
|
196
|
+
t-esc="record.qty_done.raw_value"
|
197
|
+
/>
|
198
|
+
 / 
|
199
|
+
<span
|
200
|
+
t-esc="record.product_uom_qty.raw_value"
|
201
|
+
/>
|
202
|
+
|
203
|
+
<span
|
204
|
+
t-if="record.uom_id"
|
205
|
+
t-esc="record.uom_id.value"
|
206
|
+
/>
|
207
|
+
</div>
|
248
208
|
</div>
|
249
|
-
<div
|
209
|
+
<div
|
210
|
+
class="col-4 col-md-4 d-flex justify-content-end align-items-center"
|
211
|
+
>
|
212
|
+
|
250
213
|
<button
|
251
|
-
name="
|
214
|
+
name="action_barcode_inventory_quant_edit"
|
252
215
|
type="object"
|
253
|
-
class="btn"
|
216
|
+
class="btn mt0"
|
254
217
|
context="{'wiz_barcode_id': parent.id}"
|
255
218
|
>
|
256
219
|
<i
|
257
|
-
class="fa fa-
|
258
|
-
title="
|
259
|
-
|
220
|
+
class="fa fa-pencil"
|
221
|
+
title="Edit inventory quantity"
|
222
|
+
/>
|
223
|
+
</button>
|
224
|
+
<button
|
225
|
+
name="operation_quantities"
|
226
|
+
type="object"
|
227
|
+
class="btn btn-lg btn-primary btn-op-sum"
|
228
|
+
t-if="record.qty_done_rest.raw_value > 0"
|
229
|
+
>
|
230
|
+
+
|
231
|
+
<span
|
232
|
+
class="text-white"
|
233
|
+
t-esc="record.qty_done_rest.raw_value"
|
260
234
|
/>
|
261
235
|
</button>
|
262
236
|
</div>
|
@@ -267,6 +241,12 @@
|
|
267
241
|
</kanban>
|
268
242
|
</field>
|
269
243
|
</group>
|
244
|
+
<h3
|
245
|
+
class="mt-4 w-100 px-4"
|
246
|
+
attrs="{'invisible': ['|', ('move_line_ids', '=', []), ('show_detailed_operations', '=', False)]}"
|
247
|
+
>
|
248
|
+
Detailed operations
|
249
|
+
</h3>
|
270
250
|
<group
|
271
251
|
string="Detailed operations"
|
272
252
|
col="2"
|
@@ -278,75 +258,47 @@
|
|
278
258
|
nolabel="1"
|
279
259
|
colspan="2"
|
280
260
|
force_save="1"
|
281
|
-
mode="
|
261
|
+
mode="kanban"
|
282
262
|
>
|
283
|
-
<tree>
|
284
|
-
<field name="picking_code" invisible="1" />
|
285
|
-
<field name="product_id" options="{'no_open': True}" />
|
286
|
-
<field
|
287
|
-
name="location_id"
|
288
|
-
options="{'no_open': True}"
|
289
|
-
groups="stock.group_stock_multi_locations"
|
290
|
-
attrs="{'invisible': [('picking_code', '=', 'incoming')]}"
|
291
|
-
optional="show"
|
292
|
-
/>
|
293
|
-
<field
|
294
|
-
name="location_dest_id"
|
295
|
-
options="{'no_open': True}"
|
296
|
-
groups="stock.group_stock_multi_locations"
|
297
|
-
attrs="{'invisible': [('picking_code', '=', 'outgoing')]}"
|
298
|
-
optional="show"
|
299
|
-
/>
|
300
|
-
<field
|
301
|
-
name="lot_id"
|
302
|
-
groups="stock.group_production_lot"
|
303
|
-
options="{'no_open': True}"
|
304
|
-
optional="show"
|
305
|
-
/>
|
306
|
-
<field
|
307
|
-
name="result_package_id"
|
308
|
-
groups="stock.group_tracking_lot"
|
309
|
-
options="{'no_open': True}"
|
310
|
-
optional="show"
|
311
|
-
/>
|
312
|
-
<field name="qty_done" />
|
313
|
-
<field
|
314
|
-
name="product_uom_id"
|
315
|
-
groups="uom.group_uom"
|
316
|
-
options="{'no_open': True}"
|
317
|
-
/>
|
318
|
-
<button
|
319
|
-
name="action_barcode_detailed_operation_unlink"
|
320
|
-
title="Remove detailed operation"
|
321
|
-
type="object"
|
322
|
-
class="btn"
|
323
|
-
icon="fa-trash"
|
324
|
-
context="{'wiz_barcode_id': parent.id}"
|
325
|
-
/>
|
326
|
-
</tree>
|
327
263
|
<kanban class="o_kanban_mobile">
|
328
264
|
<field name="product_id" />
|
329
265
|
<field name="qty_done" />
|
330
266
|
<field name="product_uom_id" />
|
267
|
+
<field name="lot_id" />
|
268
|
+
<field name="result_package_id" />
|
331
269
|
<templates>
|
332
270
|
<t t-name="kanban-box">
|
333
|
-
<div
|
271
|
+
<div class="oe_kanban_global_click">
|
334
272
|
<div class="row">
|
335
|
-
<div class="col-
|
336
|
-
<
|
337
|
-
|
338
|
-
|
339
|
-
</span>
|
340
|
-
</strong>
|
341
|
-
</div>
|
342
|
-
<div class="col-2">
|
343
|
-
<span
|
344
|
-
class="fw-bold text-end float-end"
|
273
|
+
<div class="col-8 col-md-8">
|
274
|
+
<field name="product_id" class="h2" />
|
275
|
+
<div
|
276
|
+
class="d-flex justify-content-start align-items-center indent h4 pt-3"
|
345
277
|
>
|
346
|
-
<
|
347
|
-
|
278
|
+
<t t-if="record.lot_id.raw_value">
|
279
|
+
Lot:
|
280
|
+
<span
|
281
|
+
t-esc="record.lot_id.raw_value"
|
282
|
+
/>
|
283
|
+
</t>
|
284
|
+
<t
|
285
|
+
t-if="record.result_package_id.raw_value"
|
286
|
+
>
|
287
|
+
Package:
|
288
|
+
<span
|
289
|
+
t-esc="record.result_package_id.raw_value"
|
290
|
+
/>
|
291
|
+
</t>
|
292
|
+
</div>
|
348
293
|
</div>
|
349
|
-
<div
|
294
|
+
<div
|
295
|
+
class="col-4 col-md-4 d-flex justify-content-end align-items-center"
|
296
|
+
>
|
297
|
+
<span
|
298
|
+
class="h3"
|
299
|
+
t-esc="record.qty_done.raw_value"
|
300
|
+
/>
|
301
|
+
|
350
302
|
<button
|
351
303
|
name="action_barcode_detailed_operation_unlink"
|
352
304
|
type="object"
|
@@ -356,25 +308,10 @@
|
|
356
308
|
<i
|
357
309
|
class="fa fa-trash"
|
358
310
|
title="Remove"
|
359
|
-
style="font-size:1.5em"
|
360
311
|
/>
|
361
312
|
</button>
|
362
313
|
</div>
|
363
314
|
</div>
|
364
|
-
<div class="row">
|
365
|
-
<div class="col-4">
|
366
|
-
Lot: <field name="lot_id" />
|
367
|
-
</div>
|
368
|
-
<t
|
369
|
-
t-if="record.result_package_id.raw_value"
|
370
|
-
>
|
371
|
-
<div class="col-4">
|
372
|
-
Package: <field
|
373
|
-
name="result_package_id"
|
374
|
-
/>
|
375
|
-
</div>
|
376
|
-
</t>
|
377
|
-
</div>
|
378
315
|
</div>
|
379
316
|
</t>
|
380
317
|
</templates>
|
@@ -399,15 +336,55 @@
|
|
399
336
|
name="action_put_in_pack"
|
400
337
|
help="Put in pack"
|
401
338
|
type="object"
|
402
|
-
icon="fa-
|
339
|
+
icon="fa-cube fa-2x"
|
403
340
|
title="Put in Pack"
|
404
341
|
attrs="{'invisible': ['|', ('picking_state', 'in', ('draft', 'done', 'cancel')), ('display_menu', '=', True)]}"
|
405
|
-
class="
|
342
|
+
class="btn btn-secondary w-100 oe_kanban_action_button btn-sm text-uppercase
|
343
|
+
d-flex justify-content-center align-items-center fs-2"
|
406
344
|
groups="stock.group_tracking_lot"
|
407
345
|
data-hotkey="6"
|
408
346
|
>
|
347
|
+
<span class="d-none d-lg-block">Put in back</span>
|
348
|
+
</button>
|
349
|
+
<!-- t-att-class="'btn float-end' + (record.is_pending.raw_value == false ? ' btn-primary' : ' btn-secondary border')"-->
|
350
|
+
<button
|
351
|
+
name="action_validate_picking"
|
352
|
+
type="object"
|
353
|
+
icon="fa-check fa-2x"
|
354
|
+
class="btn btn-secondary w-100 oe_kanban_action_button btn-sm text-uppercase
|
355
|
+
d-flex justify-content-center align-items-center fs-2"
|
356
|
+
attrs="{'invisible': [('picking_state', 'not in', ['draft', 'assigned', 'confirmed'])]}"
|
357
|
+
confirm="Are you sure to validate the picking ?"
|
358
|
+
data-hotkey="'shift+v'"
|
359
|
+
>
|
360
|
+
<span class="d-none d-lg-block">Validate</span>
|
409
361
|
</button>
|
410
362
|
</xpath>
|
363
|
+
<xpath
|
364
|
+
expr="//div[hasclass('oe_stock_barcodes_bottombar')]//div[hasclass('dropup')]"
|
365
|
+
position="inside"
|
366
|
+
>
|
367
|
+
<field
|
368
|
+
name="show_detailed_operations"
|
369
|
+
widget="barcode_boolean_toggle"
|
370
|
+
class="d-none"
|
371
|
+
/>
|
372
|
+
<button
|
373
|
+
name="action_show_detailed_operations"
|
374
|
+
type="object"
|
375
|
+
title="Detailed operations"
|
376
|
+
icon="fa-eye fa-2x"
|
377
|
+
attrs="{'invisible': ['|', ('move_line_ids', '=', []), ('show_detailed_operations', '=', True)]}"
|
378
|
+
/>
|
379
|
+
|
380
|
+
<button
|
381
|
+
name="action_show_detailed_operations"
|
382
|
+
type="object"
|
383
|
+
title="Detailed operations"
|
384
|
+
icon="fa-eye-slash fa-2x"
|
385
|
+
attrs="{'invisible': ['|', ('move_line_ids', '=', []), ('show_detailed_operations', '=', False)]}"
|
386
|
+
/>
|
387
|
+
</xpath>
|
411
388
|
</field>
|
412
389
|
</record>
|
413
390
|
<!--
|
@@ -419,10 +396,10 @@
|
|
419
396
|
<field name="name">Barcodes Read</field>
|
420
397
|
<field name="view_mode">form</field>
|
421
398
|
<field name="context">{"control_panel_hidden": True,
|
422
|
-
|
399
|
+
"form_view_initial_mode": "edit"}
|
423
400
|
</field>
|
424
401
|
<field name="view_id" ref="view_stock_barcodes_read_picking_form" />
|
425
|
-
<field name="target">
|
402
|
+
<field name="target">fullscreen</field>
|
426
403
|
</record>
|
427
404
|
<record model="ir.actions.act_window" id="action_stock_barcodes_menu">
|
428
405
|
<field name="res_model">wiz.stock.barcodes.read.picking</field>
|
@@ -430,7 +407,8 @@
|
|
430
407
|
<field name="view_mode">form</field>
|
431
408
|
<field
|
432
409
|
name="context"
|
433
|
-
>{'control_panel_hidden': True, "default_display_menu": True}
|
410
|
+
>{'control_panel_hidden': True, "default_display_menu": True}
|
411
|
+
</field>
|
434
412
|
<field name="view_id" ref="view_stock_barcodes_read_picking_form" />
|
435
413
|
<field name="target">current</field>
|
436
414
|
</record>
|
@@ -14,6 +14,7 @@ class WizStockBarcodesReadTodo(models.TransientModel):
|
|
14
14
|
|
15
15
|
name = fields.Char()
|
16
16
|
wiz_barcode_id = fields.Many2one(comodel_name="wiz.stock.barcodes.read.picking")
|
17
|
+
picking_state = fields.Selection(related="wiz_barcode_id.picking_state")
|
17
18
|
partner_id = fields.Many2one(
|
18
19
|
comodel_name="res.partner",
|
19
20
|
readonly=True,
|
@@ -42,6 +43,7 @@ class WizStockBarcodesReadTodo(models.TransientModel):
|
|
42
43
|
digits="Product Unit of Measure",
|
43
44
|
compute="_compute_qty_done",
|
44
45
|
)
|
46
|
+
qty_done_rest = fields.Float(compute="_compute_qty_done_rest", store=True)
|
45
47
|
location_id = fields.Many2one(comodel_name="stock.location")
|
46
48
|
location_name = fields.Char(related="location_id.name")
|
47
49
|
location_dest_id = fields.Many2one(comodel_name="stock.location")
|
@@ -65,6 +67,11 @@ class WizStockBarcodesReadTodo(models.TransientModel):
|
|
65
67
|
# Used in kanban view
|
66
68
|
is_stock_move_line_origin = fields.Boolean()
|
67
69
|
|
70
|
+
@api.depends("qty_done", "product_uom_qty")
|
71
|
+
def _compute_qty_done_rest(self):
|
72
|
+
for rec in self:
|
73
|
+
rec.qty_done_rest = rec.product_uom_qty - rec.qty_done
|
74
|
+
|
68
75
|
def action_todo_next(self):
|
69
76
|
self.state = "done_forced"
|
70
77
|
self.line_ids.barcode_scan_state = "done_forced"
|
@@ -176,3 +183,41 @@ class WizStockBarcodesReadTodo(models.TransientModel):
|
|
176
183
|
self.wiz_barcode_id.product_uom_id = self.uom_id
|
177
184
|
self.wiz_barcode_id.action_show_step()
|
178
185
|
self.wiz_barcode_id._set_focus_on_qty_input()
|
186
|
+
|
187
|
+
def operation_quantities(self):
|
188
|
+
self.wiz_barcode_id.manual_entry = True
|
189
|
+
self.wiz_barcode_id.product_qty = self.product_qty_reserved
|
190
|
+
self.wiz_barcode_id.product_id = self.product_id.id
|
191
|
+
if self.wiz_barcode_id.picking_id.picking_type_id.code != "incoming":
|
192
|
+
self.wiz_barcode_id.qty_available = self.product_qty_reserved
|
193
|
+
self.wiz_barcode_id.product_id = self.product_id.id
|
194
|
+
self.wiz_barcode_id.location_id = self.location_id.id
|
195
|
+
self.wiz_barcode_id.with_context(manual_picking=True).action_confirm()
|
196
|
+
|
197
|
+
def _get_fields_to_edit(self):
|
198
|
+
return [
|
199
|
+
"location_dest_id",
|
200
|
+
"location_id",
|
201
|
+
"product_id",
|
202
|
+
"lot_id",
|
203
|
+
"package_id",
|
204
|
+
]
|
205
|
+
|
206
|
+
def action_barcode_inventory_quant_edit(self):
|
207
|
+
wiz_barcode_id = self.env.context.get("wiz_barcode_id", False)
|
208
|
+
wiz_barcode = self.env["wiz.stock.barcodes.read.picking"].browse(wiz_barcode_id)
|
209
|
+
for quant in self:
|
210
|
+
# Try to assign fields with the same name between quant and the scan wizard
|
211
|
+
for fname in self._get_fields_to_edit():
|
212
|
+
if hasattr(wiz_barcode, fname):
|
213
|
+
wiz_barcode[fname] = quant[fname]
|
214
|
+
wiz_barcode.product_qty = quant.qty_done
|
215
|
+
|
216
|
+
wiz_barcode.manual_entry = True
|
217
|
+
self.env["bus.bus"]._sendone(
|
218
|
+
"stock_barcodes_scan",
|
219
|
+
"stock_barcodes_edit_manual",
|
220
|
+
{
|
221
|
+
"manual_entry": True,
|
222
|
+
},
|
223
|
+
)
|