From e6db0c3fc36516fb154ea551286331f57bf6e911 Mon Sep 17 00:00:00 2001 From: lauty95 Date: Thu, 9 Apr 2026 14:12:13 +0000 Subject: [PATCH 1/3] fix: ensure CI fails when pytest fails by adding pipefail --- .github/workflows/pytest.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 2df05b9d..67cbf748 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -83,6 +83,7 @@ jobs: - name: Run Tests working-directory: /home/runner/frappe-bench run: | + set -o pipefail source env/bin/activate cd apps/beam poetry install From ecc73c95bfa69ff67e573fa279f5519303530871 Mon Sep 17 00:00:00 2001 From: lauty95 Date: Thu, 16 Apr 2026 13:52:37 +0000 Subject: [PATCH 2/3] fix: target with uom --- beam/beam/scan/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/beam/beam/scan/__init__.py b/beam/beam/scan/__init__.py index ad382736..5b903349 100644 --- a/beam/beam/scan/__init__.py +++ b/beam/beam/scan/__init__.py @@ -279,10 +279,14 @@ def get_form_action(barcode_doc: frappe._dict, context: frappe._dict) -> list[di elif has_frm_override: # A beam_frm override handles this form — skip get_item_details() which would # fail for forms without a standard "{doctype} Item" child table. + item_defaults = frappe.db.get_value( + "Item", barcode_doc.doc.name, ["stock_uom"], as_dict=True + ) target = frappe._dict( { "doctype": context.frm, "item_code": barcode_doc.doc.name, + "uom": item_defaults.stock_uom if item_defaults else None, } ) else: From 30226ec76b4b20530491256fbc0b9fc756f426c7 Mon Sep 17 00:00:00 2001 From: lauty95 Date: Thu, 16 Apr 2026 13:53:15 +0000 Subject: [PATCH 3/3] fix: linters --- beam/beam/scan/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/beam/beam/scan/__init__.py b/beam/beam/scan/__init__.py index 5b903349..3dac3402 100644 --- a/beam/beam/scan/__init__.py +++ b/beam/beam/scan/__init__.py @@ -279,9 +279,7 @@ def get_form_action(barcode_doc: frappe._dict, context: frappe._dict) -> list[di elif has_frm_override: # A beam_frm override handles this form — skip get_item_details() which would # fail for forms without a standard "{doctype} Item" child table. - item_defaults = frappe.db.get_value( - "Item", barcode_doc.doc.name, ["stock_uom"], as_dict=True - ) + item_defaults = frappe.db.get_value("Item", barcode_doc.doc.name, ["stock_uom"], as_dict=True) target = frappe._dict( { "doctype": context.frm,