diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed50062..ee7e674 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,16 +33,16 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '3.12' - name: Setup Node uses: actions/setup-node@v2 with: - node-version: 14 + node-version: 20 check-latest: true - name: Cache pip - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml', '**/setup.py', '**/setup.cfg') }} @@ -54,7 +54,7 @@ jobs: id: yarn-cache-dir-path run: 'echo "::set-output name=dir::$(yarn cache dir)"' - - uses: actions/cache@v2 + - uses: actions/cache@v4 id: yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} @@ -65,7 +65,7 @@ jobs: - name: Setup run: | pip install frappe-bench - bench init --skip-redis-config-generation --skip-assets --python "$(which python)" ~/frappe-bench + bench init --frappe-branch version-15 --skip-redis-config-generation --skip-assets --python "$(which python)" ~/frappe-bench mysql --host 127.0.0.1 --port 3306 -u root -proot -e "SET GLOBAL character_set_server = 'utf8mb4'" mysql --host 127.0.0.1 --port 3306 -u root -proot -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'" diff --git a/item_explorer/item_explorer/doctype/item_explorer/item_explorer.py b/item_explorer/item_explorer/doctype/item_explorer/item_explorer.py index b19e367..3830923 100644 --- a/item_explorer/item_explorer/doctype/item_explorer/item_explorer.py +++ b/item_explorer/item_explorer/doctype/item_explorer/item_explorer.py @@ -77,10 +77,7 @@ def get_children(parent=None, product_category=None, item_code=None, product_nam part_lists = get_part_lists([parent_value]) return part_lists elif parent_type == _("Part List"): - items = get_part_list_items(parent_value) - for item in items: - item["type"] = _("Part List Item") - return items + return get_part_list_items(parent_value) elif parent_type == _("Product Bundle") or parent_type == _("Item Variant / Product Bundle"): part_lists = get_part_lists([parent_value]) return get_product_bundle_items(parent_value) + part_lists @@ -277,7 +274,8 @@ def get_part_list_items(part_list): # Modify the title field to include the circled number and quantity item["title"] = f"{circled_num}{item['quantity']}x {item['title']}" - item["type"] = _("Item") # Add the 'type' field + + items = set_expandable(items) # Add additional JSON field if needed (assumed this function does extra processing) items = add_stock_levels(items) diff --git a/item_explorer/item_explorer/doctype/item_explorer/item_explorer_tree.js b/item_explorer/item_explorer/doctype/item_explorer/item_explorer_tree.js index 1911359..75e3651 100644 --- a/item_explorer/item_explorer/doctype/item_explorer/item_explorer_tree.js +++ b/item_explorer/item_explorer/doctype/item_explorer/item_explorer_tree.js @@ -163,6 +163,7 @@ frappe.treeview_settings['Item Explorer'] = { node.data.type == __('Item') || node.data.type == __('Item Variant') || node.data.type == __('Item Variant / Product Bundle') || + node.data.type == __('Product Bundle') || node.data.type == __('Part List Item') || node.data.type == __('Product Bundle Item') ); @@ -180,6 +181,7 @@ frappe.treeview_settings['Item Explorer'] = { node.data.type == __('Item') || node.data.type == __('Item Variant') || node.data.type == __('Item Variant / Product Bundle') || + node.data.type == __('Product Bundle') || node.data.type == __('Part List Item') || node.data.type == __('Product Bundle Item') );