odoo-addon-stock-barcodes 15.0.3.1.6__py3-none-any.whl → 16.0.1.0.0.19__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.
Files changed (59) hide show
  1. odoo/addons/stock_barcodes/README.rst +6 -6
  2. odoo/addons/stock_barcodes/__manifest__.py +8 -7
  3. odoo/addons/stock_barcodes/data/stock_barcodes_option.xml +1 -2
  4. odoo/addons/stock_barcodes/hooks.py +15 -13
  5. odoo/addons/stock_barcodes/i18n/es.po +305 -189
  6. odoo/addons/stock_barcodes/i18n/it.po +282 -180
  7. odoo/addons/stock_barcodes/i18n/stock_barcodes.pot +190 -160
  8. odoo/addons/stock_barcodes/models/__init__.py +1 -1
  9. odoo/addons/stock_barcodes/models/stock_barcodes_action.py +2 -1
  10. odoo/addons/stock_barcodes/models/stock_barcodes_option.py +2 -4
  11. odoo/addons/stock_barcodes/models/stock_move.py +37 -0
  12. odoo/addons/stock_barcodes/models/stock_move_line.py +8 -14
  13. odoo/addons/stock_barcodes/models/stock_picking.py +9 -36
  14. odoo/addons/stock_barcodes/models/stock_picking_type.py +5 -6
  15. odoo/addons/stock_barcodes/models/stock_quant.py +3 -4
  16. odoo/addons/stock_barcodes/security/ir.model.access.csv +0 -2
  17. odoo/addons/stock_barcodes/static/description/index.html +9 -11
  18. odoo/addons/stock_barcodes/static/src/css/stock.scss +41 -5
  19. odoo/addons/stock_barcodes/static/src/utils/barcode_handler_field.esm.js +36 -0
  20. odoo/addons/stock_barcodes/static/src/utils/barcodes_models_utils.esm.js +25 -0
  21. odoo/addons/stock_barcodes/static/src/views/form_view.esm.js +17 -0
  22. odoo/addons/stock_barcodes/static/src/views/kanban_renderer.esm.js +149 -0
  23. odoo/addons/stock_barcodes/static/src/views/view_compiler.esm.js +16 -0
  24. odoo/addons/stock_barcodes/static/src/views/views.esm.js +193 -0
  25. odoo/addons/stock_barcodes/static/src/widgets/boolean_toggle.esm.js +26 -0
  26. odoo/addons/stock_barcodes/static/src/widgets/numeric_step.esm.js +40 -0
  27. odoo/addons/stock_barcodes/static/src/widgets/numeric_step.xml +17 -0
  28. odoo/addons/stock_barcodes/static/src/widgets/view_button.esm.js +8 -0
  29. odoo/addons/stock_barcodes/static/src/widgets/view_button.xml +14 -0
  30. odoo/addons/stock_barcodes/tests/common.py +167 -0
  31. odoo/addons/stock_barcodes/tests/test_stock_barcodes.py +4 -172
  32. odoo/addons/stock_barcodes/tests/test_stock_barcodes_new_lot.py +2 -2
  33. odoo/addons/stock_barcodes/tests/test_stock_barcodes_picking.py +8 -8
  34. odoo/addons/stock_barcodes/views/stock_barcodes_option_view.xml +1 -1
  35. odoo/addons/stock_barcodes/views/stock_picking_views.xml +4 -3
  36. odoo/addons/stock_barcodes/wizard/stock_barcodes_read.py +45 -91
  37. odoo/addons/stock_barcodes/wizard/stock_barcodes_read_inventory.py +1 -4
  38. odoo/addons/stock_barcodes/wizard/stock_barcodes_read_inventory_views.xml +14 -15
  39. odoo/addons/stock_barcodes/wizard/stock_barcodes_read_picking.py +256 -92
  40. odoo/addons/stock_barcodes/wizard/stock_barcodes_read_picking_views.xml +59 -37
  41. odoo/addons/stock_barcodes/wizard/stock_barcodes_read_todo.py +33 -107
  42. odoo/addons/stock_barcodes/wizard/stock_barcodes_read_todo_view.xml +70 -28
  43. odoo/addons/stock_barcodes/wizard/stock_barcodes_read_views.xml +172 -189
  44. odoo/addons/stock_barcodes/wizard/stock_production_lot.py +2 -2
  45. odoo/addons/stock_barcodes/wizard/stock_production_lot_views.xml +6 -8
  46. {odoo_addon_stock_barcodes-15.0.3.1.6.dist-info → odoo_addon_stock_barcodes-16.0.1.0.0.19.dist-info}/METADATA +11 -11
  47. odoo_addon_stock_barcodes-16.0.1.0.0.19.dist-info/RECORD +66 -0
  48. {odoo_addon_stock_barcodes-15.0.3.1.6.dist-info → odoo_addon_stock_barcodes-16.0.1.0.0.19.dist-info}/WHEEL +1 -1
  49. odoo/addons/stock_barcodes/migrations/15.0.1.0.0/pre-migration.py +0 -14
  50. odoo/addons/stock_barcodes/models/stock_barcodes_read_log.py +0 -51
  51. odoo/addons/stock_barcodes/static/src/css/stock.css +0 -5
  52. odoo/addons/stock_barcodes/static/src/js/barcodes_models_mixin.js +0 -34
  53. odoo/addons/stock_barcodes/static/src/js/basic_controller.js +0 -412
  54. odoo/addons/stock_barcodes/static/src/js/basic_fields.js +0 -59
  55. odoo/addons/stock_barcodes/static/src/js/form_view.js +0 -24
  56. odoo/addons/stock_barcodes/static/src/js/kanban_renderer.js +0 -47
  57. odoo/addons/stock_barcodes/static/src/js/numeric_step.js +0 -43
  58. odoo_addon_stock_barcodes-15.0.3.1.6.dist-info/RECORD +0 -62
  59. {odoo_addon_stock_barcodes-15.0.3.1.6.dist-info → odoo_addon_stock_barcodes-16.0.1.0.0.19.dist-info}/top_level.txt +0 -0
@@ -2,11 +2,11 @@
2
2
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3
3
  from odoo.tests.common import tagged
4
4
 
5
- from .test_stock_barcodes_picking import TestStockBarcodesPicking
5
+ from .common import TestCommonStockBarcodes
6
6
 
7
7
 
8
8
  @tagged("post_install", "-at_install")
9
- class TestStockBarcodesNewLot(TestStockBarcodesPicking):
9
+ class TestStockBarcodesNewLot(TestCommonStockBarcodes):
10
10
  @classmethod
11
11
  def setUpClass(cls):
12
12
  super().setUpClass()
@@ -2,11 +2,11 @@
2
2
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3
3
  from odoo.tests.common import tagged
4
4
 
5
- from .test_stock_barcodes import TestStockBarcodes
5
+ from .common import TestCommonStockBarcodes
6
6
 
7
7
 
8
8
  @tagged("post_install", "-at_install")
9
- class TestStockBarcodesPicking(TestStockBarcodes):
9
+ class TestStockBarcodesPicking(TestCommonStockBarcodes):
10
10
  @classmethod
11
11
  def setUpClass(cls):
12
12
  super().setUpClass()
@@ -17,8 +17,6 @@ class TestStockBarcodesPicking(TestStockBarcodes):
17
17
  cls.barcode_option_group_out = cls._create_barcode_option_group_outgoing()
18
18
  cls.barcode_option_group_in = cls._create_barcode_option_group_incoming()
19
19
 
20
- cls.barcode_option_group_out.show_scan_log = True
21
- cls.barcode_option_group_in.show_scan_log = True
22
20
  cls.barcode_option_group_out.barcode_guided_mode = False
23
21
  cls.barcode_option_group_in.barcode_guided_mode = False
24
22
  cls.partner_agrolite = cls.env.ref("base.res_partner_2")
@@ -41,7 +39,7 @@ class TestStockBarcodesPicking(TestStockBarcodes):
41
39
  "location_dest_id": cls.customer_location.id,
42
40
  "partner_id": cls.partner_agrolite.id,
43
41
  "picking_type_id": cls.picking_type_out.id,
44
- "move_lines": [
42
+ "move_ids": [
45
43
  (
46
44
  0,
47
45
  0,
@@ -68,7 +66,7 @@ class TestStockBarcodesPicking(TestStockBarcodes):
68
66
  "location_dest_id": cls.stock_location.id,
69
67
  "partner_id": cls.partner_agrolite.id,
70
68
  "picking_type_id": cls.picking_type_in.id,
71
- "move_lines": [
69
+ "move_ids": [
72
70
  (
73
71
  0,
74
72
  0,
@@ -215,10 +213,10 @@ class TestStockBarcodesPicking(TestStockBarcodes):
215
213
  wiz_barcode_id=self.wiz_scan_picking.id, picking_id=self.picking_out_01.id
216
214
  )
217
215
  candidate_wiz.with_context(force_create_move=True).action_lock_picking()
218
- self.assertEqual(self.picking_out_01.move_lines.quantity_done, 2)
216
+ self.assertEqual(self.picking_out_01.move_ids.quantity_done, 2)
219
217
  self.wiz_scan_picking.product_qty = 2
220
218
  self.wiz_scan_picking.with_context(force_create_move=True).action_confirm()
221
- self.assertEqual(self.picking_out_01.move_lines.quantity_done, 4)
219
+ self.assertEqual(self.picking_out_01.move_ids.quantity_done, 4)
222
220
 
223
221
  # Picking out 3 is in confirmed state, so until confirmed moves has
224
222
  # not been activated candidate pickings is 2
@@ -286,6 +284,7 @@ class TestStockBarcodesPicking(TestStockBarcodes):
286
284
 
287
285
  # Continue test with a outgoing wizard
288
286
  self.wiz_scan_picking_out.option_group_id.auto_lot = True
287
+ self.wiz_scan_picking_out.auto_lot = True
289
288
  self.action_barcode_scanned(self.wiz_scan_picking_out, "8433281006850")
290
289
  self.assertEqual(self.wiz_scan_picking_out.lot_id, self.lot_1)
291
290
 
@@ -294,6 +293,7 @@ class TestStockBarcodesPicking(TestStockBarcodes):
294
293
  self.product_tracking.categ_id.removal_strategy_id = self.env.ref(
295
294
  "stock.removal_lifo"
296
295
  )
296
+ self.wiz_scan_picking_out.action_clean_values()
297
297
  self.action_barcode_scanned(self.wiz_scan_picking_out, "8433281006850")
298
298
  self.assertEqual(self.wiz_scan_picking_out.lot_id, lot_3)
299
299
 
@@ -31,9 +31,9 @@
31
31
  />
32
32
  <field name="group_key_for_todo_records" />
33
33
  <field name="location_field_to_sort" />
34
- <field name="show_scan_log" />
35
34
  <field name="show_detailed_operations" />
36
35
  <field name="auto_put_in_pack" />
36
+ <field name="display_read_quant" />
37
37
  </group>
38
38
  <group>
39
39
  <field name="ignore_filled_fields" />
@@ -28,7 +28,6 @@
28
28
  <button
29
29
  name="action_barcode_scan"
30
30
  class="btn btn-secondary"
31
- icon="fa-barcode"
32
31
  type="object"
33
32
  help="Start barcode interface"
34
33
  states="assigned"
@@ -47,9 +46,11 @@
47
46
  <field name="default_location_dest_id" invisible="1" />
48
47
  </field>
49
48
  <xpath expr="//div[hasclass('o_kanban_primary_left')]" position="inside">
49
+ <field name="barcode_option_group_id" invisible="1" />
50
50
  <div
51
51
  class="mt8"
52
- t-if="['incoming', 'outgoing', 'internal'].indexOf(record.code.raw_value) > -1"
52
+ t-if="['incoming', 'outgoing', 'internal'].indexOf(record.code.raw_value) &gt; -1"
53
+ attrs="{'invisible': [('barcode_option_group_id', '=', False)]}"
53
54
  >
54
55
  <button
55
56
  name="action_barcode_scan"
@@ -65,7 +66,7 @@
65
66
  </xpath>
66
67
  <xpath expr="//div[hasclass('o_kanban_primary_right')]" position="inside">
67
68
  <div
68
- class="mt8 pull-right"
69
+ class="float-end mt8"
69
70
  t-if="record.default_location_src_id.raw_value and record.default_location_dest_id.raw_value"
70
71
  >
71
72
  <button
@@ -23,7 +23,7 @@ class WizStockBarcodesRead(models.AbstractModel):
23
23
  )
24
24
  product_uom_id = fields.Many2one(comodel_name="uom.uom")
25
25
  product_tracking = fields.Selection(related="product_id.tracking", readonly=True)
26
- lot_id = fields.Many2one(comodel_name="stock.production.lot")
26
+ lot_id = fields.Many2one(comodel_name="stock.lot")
27
27
  lot_name = fields.Char(
28
28
  "Lot/Serial Number Name",
29
29
  compute="_compute_lot_name",
@@ -45,11 +45,6 @@ class WizStockBarcodesRead(models.AbstractModel):
45
45
  confirmed_moves = fields.Boolean(
46
46
  string="Confirmed moves", related="option_group_id.confirmed_moves"
47
47
  )
48
- # Computed field for display all scanning logs from res_model and res_id
49
- # when change product_id
50
- scan_log_ids = fields.Many2many(
51
- comodel_name="stock.barcodes.read.log", compute="_compute_scan_log_ids"
52
- )
53
48
  message_type = fields.Selection(
54
49
  [
55
50
  ("info", "Barcode read with additional info"),
@@ -64,7 +59,7 @@ class WizStockBarcodesRead(models.AbstractModel):
64
59
  guided_product_id = fields.Many2one(comodel_name="product.product")
65
60
  guided_location_id = fields.Many2one(comodel_name="stock.location")
66
61
  guided_location_dest_id = fields.Many2one(comodel_name="stock.location")
67
- guided_lot_id = fields.Many2one(comodel_name="stock.production.lot")
62
+ guided_lot_id = fields.Many2one(comodel_name="stock.lot")
68
63
  action_ids = fields.Many2many(
69
64
  comodel_name="stock.barcodes.action", compute="_compute_action_ids"
70
65
  )
@@ -73,10 +68,8 @@ class WizStockBarcodesRead(models.AbstractModel):
73
68
  step = fields.Integer()
74
69
  is_manual_qty = fields.Boolean(compute="_compute_is_manual_qty")
75
70
  is_manual_confirm = fields.Boolean(compute="_compute_is_manual_qty")
76
- show_scan_log = fields.Boolean(compute="_compute_is_manual_qty")
77
71
  # Technical field to allow use in attrs
78
72
  display_menu = fields.Boolean()
79
- qty_available = fields.Float(compute="_compute_qty_available")
80
73
  auto_lot = fields.Boolean(
81
74
  string="Get lots automatically",
82
75
  help="If checked the lot will be set automatically with the same "
@@ -110,7 +103,6 @@ class WizStockBarcodesRead(models.AbstractModel):
110
103
  rec.is_manual_qty = rec.option_group_id.is_manual_qty
111
104
  rec.is_manual_confirm = rec.option_group_id.is_manual_confirm
112
105
  rec.auto_lot = rec.option_group_id.auto_lot
113
- rec.show_scan_log = rec.option_group_id.show_scan_log
114
106
 
115
107
  @api.depends("option_group_id")
116
108
  def _compute_auto_lot(self):
@@ -122,24 +114,6 @@ class WizStockBarcodesRead(models.AbstractModel):
122
114
  for rec in self:
123
115
  rec.create_lot = rec.option_group_id.create_lot
124
116
 
125
- @api.depends("location_id", "product_id", "lot_id")
126
- def _compute_qty_available(self):
127
- if not self.product_id or self.location_id.usage != "internal":
128
- self.qty_available = 0.0
129
- return
130
- domain_quant = [
131
- ("product_id", "=", self.product_id.id),
132
- ("location_id", "=", self.location_id.id),
133
- ]
134
- if self.lot_id:
135
- domain_quant.append(("lot_id", "=", self.lot_id.id))
136
- # if self.package_id:
137
- # domain_quant.append(('package_id', '=', self.package_id.id))
138
- groups = self.env["stock.quant"].read_group(
139
- domain_quant, ["quantity"], [], orderby="id"
140
- )
141
- self.qty_available = groups[0]["quantity"]
142
-
143
117
  @api.depends("product_id")
144
118
  def _compute_display_assign_serial(self):
145
119
  for rec in self:
@@ -234,7 +208,7 @@ class WizStockBarcodesRead(models.AbstractModel):
234
208
  lot_domain = [("name", "=", self.barcode)]
235
209
  if self.product_id:
236
210
  lot_domain.append(("product_id", "=", self.product_id.id))
237
- lot = self.env["stock.production.lot"].search(lot_domain)
211
+ lot = self.env["stock.lot"].search(lot_domain)
238
212
  if len(lot) == 1:
239
213
  if self.option_group_id.fill_fields_from_lot:
240
214
  quant_domain = [
@@ -420,6 +394,12 @@ class WizStockBarcodesRead(models.AbstractModel):
420
394
  self._set_messagge_info(
421
395
  "not_found", _("Barcode not found with this screen values")
422
396
  )
397
+ self.display_notification(
398
+ self.barcode,
399
+ message_type="danger",
400
+ title=_("Barcode not found"),
401
+ sticky=False,
402
+ )
423
403
  return False
424
404
  if not self.check_option_required():
425
405
  return False
@@ -478,7 +458,10 @@ class WizStockBarcodesRead(models.AbstractModel):
478
458
 
479
459
  def on_barcode_scanned(self, barcode):
480
460
  self.barcode = self._clean_barcode_scanned(barcode)
481
- self.process_barcode(barcode)
461
+
462
+ def dummy_on_barcode_scanned(self):
463
+ """To avoid execute operations in onchange environment"""
464
+ self.process_barcode(self.barcode)
482
465
 
483
466
  def check_location_contidion(self):
484
467
  if not self.location_id:
@@ -563,9 +546,6 @@ class WizStockBarcodesRead(models.AbstractModel):
563
546
  return False
564
547
  if not self.check_done_conditions():
565
548
  return False
566
- if not self.env.context.get("_stock_barcodes_skip_read_log"):
567
- _logger.info("Add scanned log barcode:{}".format(self.barcode))
568
- self._add_read_log()
569
549
  self.process_lot_before_done()
570
550
  return True
571
551
 
@@ -630,7 +610,9 @@ class WizStockBarcodesRead(models.AbstractModel):
630
610
 
631
611
  def action_clean_values(self):
632
612
  options = self.option_group_id.option_ids
633
- options_to_clean = options.filtered("clean_after_done")
613
+ options_to_clean = options.filtered(
614
+ lambda op: op.clean_after_done and op.field_name in self
615
+ )
634
616
  for option in options_to_clean:
635
617
  if option.field_name == "result_package_id" and self.keep_result_package:
636
618
  continue
@@ -644,49 +626,11 @@ class WizStockBarcodesRead(models.AbstractModel):
644
626
  def action_manual_entry(self):
645
627
  return True
646
628
 
647
- def _prepare_scan_log_values(self, log_detail=False):
648
- return {
649
- "name": self.barcode,
650
- "location_id": self.location_id.id,
651
- "product_id": self.product_id.id,
652
- "packaging_id": self.packaging_id.id,
653
- "lot_id": self.lot_id.id,
654
- "packaging_qty": self.packaging_qty,
655
- "product_qty": self.product_qty,
656
- "manual_entry": self.manual_entry,
657
- "res_model_id": self.res_model_id.id,
658
- "res_id": self.res_id,
659
- }
660
-
661
- def _add_read_log(self, log_detail=False):
662
- if self.product_qty and not self.env.context.get("force_create_move", False):
663
- vals = self._prepare_scan_log_values(log_detail)
664
- self.env["stock.barcodes.read.log"].create(vals)
665
-
666
- @api.depends("product_id", "lot_id")
667
- def _compute_scan_log_ids(self):
668
- if self.option_group_id.show_scan_log:
669
- logs = self.env["stock.barcodes.read.log"].search(
670
- [
671
- ("res_model_id", "=", self.res_model_id.id),
672
- ("res_id", "=", self.res_id),
673
- # ("location_id", "=", self.location_id.id),
674
- # ("product_id", "=", self.product_id.id),
675
- ],
676
- limit=10,
677
- )
678
- self.scan_log_ids = logs
679
- else:
680
- self.scan_log_ids = False
681
-
682
629
  # TODO: To remove when stock_move_location uses action_clean_values
683
630
  def reset_qty(self):
684
631
  self.product_qty = 0
685
632
  self.packaging_qty = 0
686
633
 
687
- def action_undo_last_scan(self):
688
- return True
689
-
690
634
  def open_actions(self):
691
635
  self.display_menu = True
692
636
 
@@ -708,11 +652,12 @@ class WizStockBarcodesRead(models.AbstractModel):
708
652
  self.visible_force_done = False
709
653
  return res
710
654
 
711
- @api.model
712
- def create(self, vals):
713
- wiz = super().create(vals)
714
- wiz.action_show_step()
715
- return wiz
655
+ @api.model_create_multi
656
+ def create(self, vals_list):
657
+ wizards = super().create(vals_list)
658
+ for wiz in wizards:
659
+ wiz.action_show_step()
660
+ return wizards
716
661
 
717
662
  def action_manual_quantity(self):
718
663
  action = self.get_formview_action()
@@ -760,7 +705,7 @@ class WizStockBarcodesRead(models.AbstractModel):
760
705
  record.write(self._convert_to_write(self._cache))
761
706
  self = record
762
707
  res = self.action_done()
763
- self.refresh()
708
+ self.invalidate_recordset()
764
709
  self.play_sounds(res)
765
710
  self._set_focus_on_qty_input()
766
711
  return res
@@ -779,15 +724,15 @@ class WizStockBarcodesRead(models.AbstractModel):
779
724
  def play_sounds(self, res):
780
725
  if res:
781
726
  self.env["bus.bus"]._sendone(
782
- "stock_barcodes-{}".format(self.ids[0]),
783
- "stock_barcodes_sound-{}".format(self.ids[0]),
784
- {"sound": "ok"},
727
+ "stock_barcodes_scan",
728
+ "stock_barcodes_sound",
729
+ {"sound": "ok", "res_model": self._name, "res_id": self.ids[0]},
785
730
  )
786
731
  else:
787
732
  self.env["bus.bus"]._sendone(
788
- "stock_barcodes-{}".format(self.ids[0]),
789
- "stock_barcodes_sound-{}".format(self.ids[0]),
790
- {"sound": "ko"},
733
+ "stock_barcodes_scan",
734
+ "stock_barcodes_sound",
735
+ {"sound": "ko", "res_model": self._name, "res_id": self.ids[0]},
791
736
  )
792
737
 
793
738
  def _set_focus_on_qty_input(self, field_name=None):
@@ -796,9 +741,14 @@ class WizStockBarcodesRead(models.AbstractModel):
796
741
  if field_name == "product_qty" and self.packaging_id:
797
742
  field_name = "packaging_qty"
798
743
  self.env["bus.bus"]._sendone(
799
- "stock_barcodes-{}".format(self.ids[0]),
800
- "stock_barcodes_read-{}".format(self.ids[0]),
801
- {"action": "focus", "field_name": field_name},
744
+ "stock_barcodes_scan",
745
+ "stock_barcodes_focus",
746
+ {
747
+ "action": "focus",
748
+ "field_name": field_name,
749
+ "res_model": self._name,
750
+ "res_id": self.ids[0],
751
+ },
802
752
  )
803
753
 
804
754
  @api.onchange("product_id")
@@ -818,7 +768,7 @@ class WizStockBarcodesRead(models.AbstractModel):
818
768
  }
819
769
 
820
770
  def _create_new_lot(self):
821
- StockProductionLot = self.env["stock.production.lot"]
771
+ StockProductionLot = self.env["stock.lot"]
822
772
  lot_domain = [
823
773
  ("name", "=", self.lot_name),
824
774
  ("product_id", "=", self.product_id.id),
@@ -841,14 +791,18 @@ class WizStockBarcodesRead(models.AbstractModel):
841
791
  """Send notifications to web client
842
792
  message_type:
843
793
  [options.type='warning'] 'info', 'success', 'warning', 'danger' or ''
844
- See web/static/src/legacy/js/core/service_mixins.js#L241 to implement more
845
- options.
846
794
  sticky: Permanent notification until user removes it
847
795
  """
848
796
  if self.option_group_id.display_notification and not self.env.context.get(
849
797
  "skip_display_notification", False
850
798
  ):
851
- message = {"message": message, "type": message_type, "sticky": sticky}
799
+ message = {
800
+ "message": message,
801
+ "type": message_type,
802
+ "sticky": sticky,
803
+ "res_model": self._name,
804
+ "res_id": self.ids[0],
805
+ }
852
806
  if title:
853
807
  message["title"] = title
854
808
  self.env["bus.bus"]._sendone(
@@ -98,10 +98,7 @@ class WizStockBarcodesReadInventory(models.TransientModel):
98
98
  )
99
99
 
100
100
  def action_done(self):
101
- result = super(
102
- WizStockBarcodesReadInventory,
103
- self.with_context(_stock_barcodes_skip_read_log=True),
104
- ).action_done()
101
+ result = super().action_done()
105
102
  if result:
106
103
  result = self._add_inventory_quant()
107
104
  if result:
@@ -14,7 +14,10 @@
14
14
  <group name="quant_package" position="replace">
15
15
  <div class="mt4">
16
16
  <strong class="d-none d-sm-block">Package</strong>
17
- <span class="fa fa-inbox d-sm-none oe_span_small_icon" />
17
+ <span
18
+ class="fa fa-inbox d-sm-none oe_span_small_icon"
19
+ title="package"
20
+ />
18
21
  <field
19
22
  name="package_id"
20
23
  options="{'no_create': True}"
@@ -34,11 +37,13 @@
34
37
  <group
35
38
  string="Inventory quants"
36
39
  attrs="{'invisible': [('inventory_quant_ids', '=', [])]}"
40
+ col="2"
37
41
  >
38
42
  <field
39
43
  name="inventory_quant_ids"
40
44
  options="{'no_open': True}"
41
45
  nolabel="1"
46
+ colspan="2"
42
47
  mode="tree,kanban"
43
48
  >
44
49
  <tree>
@@ -80,6 +85,7 @@
80
85
  type="object"
81
86
  class="btn"
82
87
  icon="fa-recycle"
88
+ title="Remove quant"
83
89
  context="{'wiz_barcode_id': parent.id}"
84
90
  />
85
91
  </tree>
@@ -100,12 +106,12 @@
100
106
  </div>
101
107
  <div class="col-2">
102
108
  <span
103
- class="pull-right text-right font-weight-bold"
109
+ class="float-end text-end fw-bold"
104
110
  >
105
111
  <field name="inventory_quantity" />
106
112
  </span>
107
113
  </div>
108
- <div class="col-3 text-right">
114
+ <div class="col-3 text-end">
109
115
  <button
110
116
  name="action_barcode_inventory_quant_edit"
111
117
  type="object"
@@ -121,15 +127,11 @@
121
127
  <button
122
128
  name="action_barcode_inventory_quant_unlink"
123
129
  type="object"
130
+ icon="fa-recycle"
131
+ title="Reset inventory quantity"
124
132
  class="btn mt0"
125
133
  context="{'wiz_barcode_id': parent.id}"
126
- >
127
- <i
128
- class="fa fa-recycle"
129
- title="Reset inventory quantity"
130
- style="font-size:1.5em"
131
- />
132
- </button>
134
+ />
133
135
  </div>
134
136
  </div>
135
137
  <div class="row">
@@ -156,10 +158,7 @@
156
158
  </group>
157
159
  <div name="manual_entry" position="after">
158
160
  <div class="d-flex" name="display_read_quant">
159
- <field
160
- name="display_read_quant"
161
- widget="FieldBarcodeBooleanToggle"
162
- />
161
+ <field name="display_read_quant" widget="barcode_boolean_toggle" />
163
162
  <label for="display_read_quant" />
164
163
  </div>
165
164
  </div>
@@ -167,7 +166,7 @@
167
166
  <button
168
167
  name="apply_inventory"
169
168
  type="object"
170
- class="btn-primary ml-auto oe_kanban_action_button btn-sm"
169
+ class="btn-primary ms-auto oe_kanban_action_button btn-sm"
171
170
  attrs="{'invisible': ['|', ('display_menu', '=', True), ('inventory_quant_ids', '=', [])]}"
172
171
  data-hotkey="7"
173
172
  groups="stock.group_stock_manager"