Skip to content

fix: don't try to create item barcode if it already exists on save#330

Merged
agritheory merged 1 commit intoversion-15from
fix_handling_unit_barcode_creation
Feb 26, 2026
Merged

fix: don't try to create item barcode if it already exists on save#330
agritheory merged 1 commit intoversion-15from
fix_handling_unit_barcode_creation

Conversation

@agritheory
Copy link
Owner

No description provided.

@github-actions
Copy link

github-actions bot commented Feb 26, 2026

📝 Draft Changelog Entry

Changelog

Fixed an issue where the system attempted to create a duplicate item barcode when saving a handling unit that already had an existing barcode assigned. The system now checks for existing barcodes before attempting to create new ones during the save operation.

This changelog entry was automatically generated by the Changelog Generator Action.

@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py10100% 
hooks.py150100% 
install.py24240%4, 6, 9–17, 20–21, 24, 27–28, 30–31, 33, 35–36, 38, 42–43
beam
   __init__.py00100% 
   barcodes.py964355%20–22, 30–32, 34–36, 40, 47, 69–70, 72–73, 79–81, 83–85, 92–94, 100, 110, 118, 125, 128–129, 135–136, 142, 148, 154, 160, 172, 175–178, 180–181
   boot.py12120%4, 6, 9–12, 17, 19–20, 24–25, 28
   handling_unit.py763751%29, 32, 53–55, 73, 84–85, 91–92, 94–95, 97–98, 100–101, 103, 105–108, 110–112, 114, 116, 118–119, 124, 126, 130, 132–133, 136, 138–139, 147
   printing.py935540%18–19, 48, 50–53, 62–66, 70–71, 83–87, 91, 97, 106–112, 114–115, 117, 122, 124–125, 140–145, 147–153, 160–163, 165–168
   zpl_layout.py2462460%12–15, 17, 20, 36, 47–48, 51–52, 54–55, 58, 61, 64–67, 69–71, 77, 81–83, 86–87, 90–91, 93–94, 99, 101, 110–111, 113, 115, 118–120, 122–125, 128–129, 132, 140–141, 144–146, 154, 157, 161, 164, 167, 177–183, 185, 188, 193–196, 198, 201–206, 209–215, 217, 219, 222, 224–227, 231–233, 235–239, 241–245, 249–253, 258, 260, 263–269, 278–282, 285–292, 295–308, 311–313, 316–328, 331, 334–336, 339–353, 356–361, 364, 366, 369, 384, 386–387, 390–391, 393, 395, 397–399, 402, 411, 418–420, 423–424, 427, 429–433, 436, 439–442, 445–448, 451–453, 469, 471, 474–475, 496–501, 505, 507–508, 516–521, 524–525
beam/doctype
   __init__.py00100% 
beam/doctype/beam_settings
   __init__.py00100% 
   beam_settings.py10460%14–17
   test_beam_settings.py30100% 
beam/doctype/handling_unit
   __init__.py9366%12–14
   handling_unit.py16193%16
   test_handling_unit.py30100% 
beam/overrides
   stock_entry.py911682%115–116, 121–128, 134–135, 151, 183, 186–187
beam/print_format
   __init__.py00100% 
beam/print_format/handling_unit_6x4_zpl_format
   __init__.py00100% 
beam/print_format/handling_unit_label
   __init__.py00100% 
beam/print_format/item_barcode
   __init__.py00100% 
beam/print_format/labelary_print_preview
   __init__.py00100% 
beam/print_format/microqr_serial_no
   __init__.py00100% 
beam/print_format/warehouse_barcode
   __init__.py00100% 
beam/report
   __init__.py00100% 
beam/report/handling_unit_traceability
   __init__.py00100% 
   handling_unit_traceability.py44440%4–6, 9–11, 30–32, 34–35, 37–38, 41–42, 45–46, 48–49, 51–52, 54–55, 57, 63–65, 67–69, 71, 74–77, 79–81, 83–86, 89–90
beam/scan
   __init__.py1883183%23, 33, 160–161, 171, 173–174, 178, 182–183, 186, 192, 221, 250, 252, 271–272, 278–285, 292, 300, 314, 422, 430, 437
   config.py26260%4, 6, 9–17, 19–21, 23–26, 28–30, 32–35, 37
tests
   conftest.py240100% 
   test_handling_unit.py4675987%18–19, 21–22, 543, 567, 608, 618, 645, 648–649, 652–661, 668–671, 680–682, 684–685, 687–689, 697, 704, 706–712, 714, 724–727, 736–739, 741–743, 751, 758–760, 762
   test_hooks_override.py390100% 
   test_item_barcode_print_format.py140100% 
   test_printing.py400100% 
   test_scan.py240100% 
   test_serial_number.py540100% 
www
   __init__.py00100% 
TOTAL161560162% 

@agritheory agritheory merged commit d7303d3 into version-15 Feb 26, 2026
9 checks passed
@agritheory agritheory deleted the fix_handling_unit_barcode_creation branch February 26, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant