Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand All @@ -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 }}
Expand All @@ -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'"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
);
Expand All @@ -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')
);
Expand Down
Loading