Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: misc minor Product Bundle fixes #28533

Merged
merged 10 commits into from
Dec 2, 2021

Conversation

GangaManoj
Copy link
Contributor

@GangaManoj GangaManoj commented Nov 24, 2021

Problems Addressed:

  1. On creating a Purchase Order from a Sales Order that has multiple Product Bundles in it, all the Product Bundles get added to the Purchase Order, even if they weren't selected.
Testing Info
  1. Create a Sales Order
  2. Add one or more Product Bundles to it
  3. Create > Purchase Order
  4. While selecting Items in the pop-up, don't select one or more of the Product Bundles

Screenshot 2021-11-24 at 6 36 49 AM

Expected Result: Only the child Items of the Product Bundle that was selected should show up in the Purchase Order.

Screenshot 2021-11-24 at 6 37 35 AM

  1. When Calculate Product Bundle Price based on Child Items' Rates(under Selling Settings) is enabled, the price of Product Bundles in Quotations, Sales Orders, Delivery Notes etc should be calculated based on the rates entered in the Packed/Bundle Items table for its child Items. However, when there are multiple Product Bundles in the same Items list, this calculation is carried out incorrectly for every Product Bundle except the first.
Testing Info
  1. Open Selling Settings
  2. Enable Calculate Product Bundle Price based on Child Items' Rates
  3. Create two or more Product Bundles
  4. Create a Sales Order
  5. Add two or more Product Bundles to the Items table
  6. Save
  7. Edit the rates for the child Items in the Packed Items table
  8. Save

Expected Result: The prices of all the Product Bundles should be equal to the sum of the prices of its child Items.

Screenshot 2021-11-24 at 6 35 13 AM

  1. On deleting Product Bundles from the Items table of any DocType that has a Packed/Bundle Items table(Sales Orders, Invoices, etc), the indices are not reset.
Images

Before:

Screenshot 2021-11-24 at 9 09 54 PM

Deleting the second row:

Screenshot 2021-11-24 at 9 11 53 PM

After:

Screenshot 2021-11-24 at 9 16 24 PM

Testing Info
  1. Create 3 or more Product Bundles
  2. Create a Sales Order
  3. Add 3 or more Product Bundles to the Items table
  4. Save
  5. Delete any of the Product Bundles in the Items table(except the last)
  6. Save
  7. Refresh

Expected Result: The indices should be displayed in order.

  1. If there are more than one Product Bundles in the Items table and any of them other than the last one are deleted, this happens till you refresh the page:

Screenshot 2021-11-29 at 6 52 48 PM

Testing Info
  1. Create 3 or more Product Bundles
  2. Create a Sales Order
  3. Add 3 or more Product Bundles to the Items table
  4. Save
  5. Delete any of the Product Bundles in the Items table(except the last)
  6. Save

@codecov
Copy link

codecov bot commented Nov 24, 2021

Codecov Report

Merging #28533 (a1055d6) into develop (87f2dcf) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head a1055d6 differs from pull request most recent head a473e1d. Consider uploading reports for the commit a473e1d to get more accurate results

@@             Coverage Diff             @@
##           develop   #28533      +/-   ##
===========================================
- Coverage    55.34%   55.32%   -0.03%     
===========================================
  Files         1119     1119              
  Lines        66664    66668       +4     
===========================================
- Hits         36897    36881      -16     
- Misses       29767    29787      +20     
Impacted Files Coverage Δ
erpnext/selling/doctype/sales_order/sales_order.py 77.50% <ø> (-0.39%) ⬇️
erpnext/stock/doctype/packed_item/packed_item.py 84.34% <100.00%> (+8.67%) ⬆️
erpnext/utilities/product.py 14.70% <0.00%> (-35.30%) ⬇️
erpnext/shopping_cart/product_info.py 30.30% <0.00%> (-21.22%) ⬇️
erpnext/education/doctype/student/student.py 73.68% <0.00%> (-3.16%) ⬇️
...ion/doctype/course_enrollment/course_enrollment.py 44.00% <0.00%> (-2.00%) ⬇️
...e/shopping_cart_settings/shopping_cart_settings.py 65.38% <0.00%> (-1.93%) ⬇️
erpnext/shopping_cart/product_query.py 61.19% <0.00%> (-1.50%) ⬇️
erpnext/portal/utils.py 28.98% <0.00%> (-1.45%) ⬇️
.../report/stock_projected_qty/stock_projected_qty.py 88.15% <0.00%> (-1.32%) ⬇️
... and 15 more

@GangaManoj GangaManoj added this to the v13.16 milestone Nov 29, 2021
@deepeshgarg007 deepeshgarg007 merged commit 322c700 into frappe:develop Dec 2, 2021
@deepeshgarg007
Copy link
Member

@Mergifyio backport version-13-hotfix

@deepeshgarg007
Copy link
Member

@Mergifyio backport version-13-pre-release

@mergify
Copy link
Contributor

mergify bot commented Dec 2, 2021

backport version-13-hotfix

✅ Backports have been created

@mergify
Copy link
Contributor

mergify bot commented Dec 2, 2021

backport version-13-pre-release

✅ Backports have been created

deepeshgarg007 added a commit that referenced this pull request Dec 2, 2021
…-28533

fix: misc minor Product Bundle fixes (backport #28533)
deepeshgarg007 added a commit that referenced this pull request Dec 2, 2021
…se/pr-28533

fix: misc minor Product Bundle fixes (backport #28533)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants