beam icon indicating copy to clipboard operation
beam copied to clipboard

[app] scan items in stock reconciliation form

Open lauty95 opened this issue 1 year ago • 7 comments

Stock Reconciliation Handling Scanning

Demo

https://github.com/user-attachments/assets/8dfc1387-504f-49c4-b676-0aff5bac7311

lauty95 avatar Feb 27 '25 18:02 lauty95

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py10100% 
beam
   barcodes.py803457%20, 29, 31, 33, 36, 47–48, 50–51, 56–59, 62–63, 69, 79, 87, 94, 97–98, 104–105, 111, 117, 123, 129, 136, 139–142, 144–145
   handling_unit.py813754%26, 32, 64–66, 84, 95–96, 102–103, 105–106, 108–109, 111–112, 114, 116–119, 121–123, 125, 127, 129–130, 135, 137, 141, 143–144, 147, 149–150, 158
   printing.py826421%18–19, 32–43, 45–48, 57–61, 65–66, 68–69, 78–82, 85–86, 92–94, 101–102, 104–106, 108–109, 111, 116, 118–119, 134–139, 141–150
beam/demand
   demand.py3389472%51, 66, 123, 209, 243, 290, 293, 425–426, 428–429, 432–433, 435, 439–444, 446, 448–449, 452, 457, 459–464, 466, 468, 471, 474, 479, 483–485, 490–491, 493, 495–497, 499, 505, 507–510, 512–515, 517, 519, 522–523, 525–526, 529, 543, 560–561, 563–565, 621, 625, 662, 667, 674, 695–696, 707, 713–729, 853
   receiving.py1251786%79, 131, 173, 214, 244, 249–260
   sqlite.py59198%40
   utils.py59788%56, 67, 72–75, 83
beam/doctype/beam_mobile_route
   beam_mobile_route.py30100% 
beam/doctype/beam_settings
   beam_settings.py281739%35–37, 40–41, 43, 50, 55–58, 66–68, 72–74
beam/doctype/handling_unit
   __init__.py9366%12–14
   handling_unit.py150100% 
beam/doctype/warehouse_types
   warehouse_types.py30100% 
beam/overrides
   sales_order.py10640%11–16
   stock_entry.py671774%61–62, 67–74, 80–81, 97, 112, 129, 132–133
   work_order.py10280%14, 16
beam/report/demand_map
   demand_map.py35350%4–5, 7–8, 11–12, 15–16, 103–111, 127, 129–143, 146–147
beam/report/handling_unit_traceability
   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__.py1362581%21, 25, 31, 39, 90, 93–94, 118–119, 129, 131–132, 136, 140–141, 144, 155–156, 160, 181, 185, 214, 216, 234, 237
   config.py28280%4, 6, 9–17, 19–21, 23–26, 28–30, 32–35, 38–39, 41
   user_login.py31310%1–3, 5, 8–10, 14–16, 18–19, 21–22, 24–26, 28–30, 32–35, 37–42, 44
www/beam
   __init__.py14140%4–7, 10–19
   index.py770%4, 6, 9–13
TOTAL126548361% 

github-actions[bot] avatar Feb 27 '25 18:02 github-actions[bot]

@lauty95 Questions about your demo: It looks like scanning at item clears the table, after you've scanned the WH. I don't think that's right, it should add_or_increment instead. Have you tested this with a handling unit?

agritheory avatar Feb 27 '25 19:02 agritheory

@agritheory 1 - Yes! It clears the table. I'll update it. 2 - Mmm I haven't tested this with a handling unit. I'll check it out

lauty95 avatar Feb 28 '25 11:02 lauty95

@agritheory

Demo of changes:

https://github.com/user-attachments/assets/4d957cc0-3143-41b9-925d-580ab7786c30

It would be great if you could test it.

One thing to note: When you scan an HU, it triggers add_or_associate action, which doesn't increment qty , but if you scan a WH that contains that item, it does increment the qty.

@Alchez I'm not using cur_frm.set_value because that method calls functions from stock_reconciliation.js that reset the table.

lauty95 avatar Mar 06 '25 14:03 lauty95

@Alchez I'm not using cur_frm.set_value because that method calls functions from stock_reconciliation.js that reset the table.

Oh that's weird. In that case, do add a comment around that code that specifies this, in case we need to figure out why it's happening in a non-standard way.

Alchez avatar Mar 06 '25 14:03 Alchez

I am experiencing #268 on this branch while attempting to review it.

agritheory avatar Apr 02 '25 13:04 agritheory

@agritheory @lauty95 I'm unable to replicate #268 on this branch, but I did see that error on #264. But otherwise, this PR should be good to proceed.

Alchez avatar May 27 '25 07:05 Alchez