From be5c5428b3c7f94158297388a5e14ec7798e9ca6 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Fri, 24 Apr 2026 13:48:58 +0530 Subject: [PATCH] ci: interim --- .github/workflows/patch.yml | 14 +++++++------- .github/workflows/server-tests-mariadb.yml | 8 +------- .../quality_inspection/quality_inspection.py | 12 +++++++----- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index ffaa6b5e7df..7cc984c399e 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -1,13 +1,13 @@ name: Patch on: - pull_request: - paths-ignore: - - '**.js' - - '**.css' - - '**.md' - - '**.html' - - '**.csv' + # pull_request: + # paths-ignore: + # - '**.js' + # - '**.css' + # - '**.md' + # - '**.html' + # - '**.csv' workflow_dispatch: concurrency: diff --git a/.github/workflows/server-tests-mariadb.yml b/.github/workflows/server-tests-mariadb.yml index 8f2dfe0c0e8..42cd4abc1e0 100644 --- a/.github/workflows/server-tests-mariadb.yml +++ b/.github/workflows/server-tests-mariadb.yml @@ -32,12 +32,6 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 - strategy: - fail-fast: false - - matrix: - container: [1, 2, 3, 4] - name: Python Unit Tests services: @@ -117,7 +111,7 @@ jobs: FRAPPE_BRANCH: ${{ github.event.inputs.branch }} - name: Run Tests - run: 'cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --app erpnext --total-builds 4 --build-number ${{ matrix.container }}' + run: 'cd ~/frappe-bench/ && bench --site test_site run-tests --doctype "Subcontracting Receipt"' env: TYPE: server CI_BUILD_ID: ${{ github.run_id }} diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.py b/erpnext/stock/doctype/quality_inspection/quality_inspection.py index 6f5b184ec00..311396b8061 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.py @@ -392,13 +392,15 @@ def item_query(doctype, txt, searchfield, start, page_len, filters): return frappe.db.sql( f""" - SELECT distinct item_code, item_name - FROM `tab{from_doctype}` - WHERE parent=%(parent)s and docstatus < 2 and item_code like %(txt)s + SELECT DISTINCT pri.item_code, pri.item_name + FROM `tab{from_doctype}` pri + JOIN `tab{parent_doctype}` pr ON pr.name = pri.parent + WHERE pri.item_code LIKE %(txt)s {qi_condition} {cond} {mcond} - ORDER BY item_code limit {cint(page_len)} offset {cint(start)} + ORDER BY pri.item_code + LIMIT {cint(page_len)} OFFSET {cint(start)} """, - {"parent": filters.get("parent"), "txt": "%%%s%%" % txt}, + {"parent": filters.get("parent"), "txt": f"%{txt}%"}, ) elif filters.get("reference_name"):