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

feat: Create single PL/DN from several SO. #30238

Merged
merged 8 commits into from
Mar 17, 2022

Conversation

KrithiRamani
Copy link
Contributor

New PR from latest develop to avoid rebase (old PR #29065 )

Documentation Updates:

https://docs.erpnext.com/docs/v13/user/manual/en/stock/delivery-note/edit?wiki_page_patch=eb709e059f
https://docs.erpnext.com/docs/v13/user/manual/en/stock/pick-list/edit?wiki_page_patch=24f2742f11

Test Cases:

Customer is not mandatory in PL

Allow selection of multiple SO from several customers

Do not edit Picked Qty in PL. Submit the PL

  • Picked Qty should = Stock Qty

Let qty = 10. Enter 5 as picked qty and submit

  • Picked Qty should remain as 5 and should not be set to stock qty

On submit of PL

  • “% Picked” (new field) should be updated in SO.
  • “Picked Qty”(new field) should be updated in corresponding SO item row

Create PL for an SO where

  • “% Picked” is 100%. - On submission, should throw validation message
  • “% Picked” is < 100 % - Should allow submission until 100%

Create PL from multiple SO by clicking on ‘Get Items’

  • submit and create DN from PL
  • should create separate DNs for each customer.

Create PL by adding items manually(not from SO). Then select an SO also. PL now has both items from SO and those not from SO

  • submit and create DN from PL
  • should create 1 DN for items added manually
  • separate DNs for items from SO, grouped by customer

@ankush ankush added the CI-failing Unit tests or patch tests are failing. label Mar 14, 2022
@codecov
Copy link

codecov bot commented Mar 15, 2022

Codecov Report

Merging #30238 (a12895e) into develop (c1740ce) will increase coverage by 0.17%.
The diff coverage is 93.82%.

@@             Coverage Diff             @@
##           develop   #30238      +/-   ##
===========================================
+ Coverage    60.38%   60.56%   +0.17%     
===========================================
  Files         1084     1084              
  Lines        68613    68670      +57     
===========================================
+ Hits         41431    41589     +158     
+ Misses       27182    27081     -101     
Impacted Files Coverage Δ
erpnext/stock/doctype/pick_list/pick_list.py 72.22% <93.82%> (+5.00%) ⬆️
...em_wise_sales_register/item_wise_sales_register.py 51.81% <0.00%> (-10.46%) ⬇️
...t/accounts/report/sales_register/sales_register.py 71.51% <0.00%> (-7.28%) ⬇️
...pnext/accounts/report/gross_profit/gross_profit.py 81.81% <0.00%> (-3.72%) ⬇️
...nthly_attendance_sheet/monthly_attendance_sheet.py 62.80% <0.00%> (-2.42%) ⬇️
erpnext/regional/saudi_arabia/utils.py 23.07% <0.00%> (-2.24%) ⬇️
erpnext/stock/utils.py 68.16% <0.00%> (-1.13%) ⬇️
...ype/account/chart_of_accounts/chart_of_accounts.py 77.39% <0.00%> (-0.69%) ⬇️
erpnext/payroll/doctype/salary_slip/salary_slip.py 84.96% <0.00%> (-0.39%) ⬇️
erpnext/projects/doctype/project/project.py 55.24% <0.00%> (-0.35%) ⬇️
... and 28 more

@ankush ankush removed the CI-failing Unit tests or patch tests are failing. label Mar 16, 2022
@rohitwaghchaure rohitwaghchaure merged commit da16ee1 into frappe:develop Mar 17, 2022
@rohitwaghchaure
Copy link
Collaborator

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Mar 17, 2022

backport version-13-hotfix

✅ Backports have been created

ankush pushed a commit that referenced this pull request Mar 17, 2022
* feat: Create single PL/DN from several SO. New PR from latest develop to avoid rebase

(cherry picked from commit 61eb9b6)

* to enable selection of SO irrespective of customer,removed validation for customer

(cherry picked from commit 466df6b)

* fixed spacings

(cherry picked from commit f33a725)

* added new field - Picked Qty, in Sales Order Item

(cherry picked from commit a68213d)

* Added new field in SO - % Picked

(cherry picked from commit 9f7fee7)

* removed semicolon for break statement

(cherry picked from commit e970616)

* as per review comments - changed for loop

(cherry picked from commit 0211f27)

* corrected spacing

(cherry picked from commit a12895e)

Co-authored-by: Krithi Ramani <krithi.ramani@gmail.com>
erpnext/stock/doctype/pick_list/pick_list.py Show resolved Hide resolved
if location.sales_order_item:
self.update_so(location.sales_order_item,0,location.item_code)

def update_so(self,so_item,picked_qty,item_code):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing whitespace? Multiple instances of this. 😅

for future reference: https://peps.python.org/pep-0008/

erpnext/stock/doctype/pick_list/pick_list.py Show resolved Hide resolved
erpnext/stock/doctype/pick_list/pick_list.py Show resolved Hide resolved
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.

3 participants