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: Concurrency issues in Sales and Purchase returns #34019

Merged

Conversation

deepeshgarg007
Copy link
Member

@deepeshgarg007 deepeshgarg007 commented Feb 12, 2023

In case multiple return requests are made against a specific Delivery Note/ Purchase Receipt at the same time both documents go through and the returned qty submitted is more than what should have been allowed.

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Feb 12, 2023
@deepeshgarg007 deepeshgarg007 added the backport version-14-hotfix backport to version 14 label Feb 13, 2023
@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Merging #34019 (79d845f) into develop (77f6789) will not change coverage.
The diff coverage is 0.00%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #34019   +/-   ##
========================================
  Coverage    63.86%   63.86%           
========================================
  Files          818      818           
  Lines        59307    59307           
========================================
  Hits         37879    37879           
  Misses       21428    21428           
Impacted Files Coverage Δ
erpnext/accounts/doctype/dunning/dunning.py 81.81% <0.00%> (ø)
erpnext/controllers/sales_and_purchase_return.py 91.78% <ø> (ø)

@deepeshgarg007 deepeshgarg007 merged commit a67284e into frappe:develop Feb 13, 2023
mergify bot pushed a commit that referenced this pull request Feb 13, 2023
deepeshgarg007 added a commit that referenced this pull request Feb 13, 2023
fix: Concurrency issues in Sales and Purchase returns (#34019)

(cherry picked from commit a67284e)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
frappe-pr-bot pushed a commit that referenced this pull request Feb 14, 2023
# [14.16.0](v14.15.1...v14.16.0) (2023-02-14)

### Bug Fixes

* `amount` in `Material Request` ([f1dd923](f1dd923))
* `get_picked_items_details` ([7afbd92](7afbd92))
* `pymysql.err.ProgrammingError` ([aa3dd33](aa3dd33))
* Add missing 1 required positional argument: 'bill_date' ([ced9274](ced9274))
* add payment hook to point of sale JS ([#33988](#33988)) ([49fd712](49fd712))
* allow PI cancel if linked asset is cancelled ([c98b2b5](c98b2b5))
* Amount for debit and credit notes with 0 qty line items ([#33902](#33902)) ([87a8c17](87a8c17))
* Amount validation in Payment Request against Purchase Order ([#34042](#34042)) ([c7c6123](c7c6123))
* BOM import failed as importer use same label field for Raw MaterialsItem table and Scrap Item table ([47d17f4](47d17f4))
* Concurrency issues in Sales and Purchase returns ([#34019](#34019)) ([087333a](087333a))
* consider `stock_qty` if `picked_qty` is zero ([df72e4a](df72e4a))
* consider existing pick list ([466a791](466a791))
* currency formatting in item-wise sales history ([#33903](#33903)) ([8e2d7bb](8e2d7bb))
* default due_date was wrong calculated on template "_Test Payment Term Template 1" (last day of next month) ([c8c9c50](c8c9c50))
* **ecommerce:** throw invalid doctype error in shop by category ([#33901](#33901)) ([1d0e71b](1d0e71b))
* failed test, convert date time to string ([7228a49](7228a49))
* german chart of accounts "SKR03" ([#33909](#33909)) ([02c4c55](02c4c55))
* Ignore mandatory fields while creating tax templates for new companies ([#34005](#34005)) ([b0ed3c8](b0ed3c8))
* Ignore Payment Ledger Entry on dunning cancel (backport [#34025](#34025)) ([#34028](#34028)) ([699e93e](699e93e))
* incorrect actual qty in Bin ([01ff6a1](01ff6a1))
* IntegrityError while cancelling journals against cr note ([c71d035](c71d035))
* list view for Terms and Conditions ([#33925](#33925)) ([bb8e232](bb8e232))
* negative stock error ([e0cd6c2](e0cd6c2))
* set per_billed based on hours when amounts are zero ([#33984](#33984)) ([5270fbe](5270fbe))
* should never get cutomer price on purchase document ([#34002](#34002)) ([6fe7600](6fe7600)), closes [#33998](#33998)
* stock entry from item dashboard (stock levels) ([04a474d](04a474d))
* **test:** `test_pick_list_for_items_with_multiple_UOM()` ([7124c0c](7124c0c))
* unwanted difference amount calculation on cr note and invoice with same currency ([#34020](#34020)) ([cbafc51](cbafc51))

### Features

* Add filters in Loan Interest Report ([#33907](#33907)) ([52bfb66](52bfb66))
* add incoterm named place to RFQ ([68a1615](68a1615))
* mandatory and mandatory depends on in inventory dimension ([3aca84c](3aca84c))
* Setting to allow Sales Order creation against expired quotation ([#33952](#33952)) ([4d0e27e](4d0e27e))

### Performance Improvements

* reduce memory usage by paging through records ([3ce8dc7](3ce8dc7))
* reduce memory usage while migrating remarks ([c191a3f](c191a3f))
deepeshgarg007 added a commit that referenced this pull request Feb 24, 2023
deepeshgarg007 added a commit that referenced this pull request Feb 24, 2023
Revert "fix: Concurrency issues in Sales and Purchase returns (#34019)"

This reverts commit a67284e.
mergify bot pushed a commit that referenced this pull request Feb 24, 2023
Revert "fix: Concurrency issues in Sales and Purchase returns (#34019)"

This reverts commit a67284e.

(cherry picked from commit e26c6dc)
mergify bot pushed a commit that referenced this pull request Feb 24, 2023
Revert "fix: Concurrency issues in Sales and Purchase returns (#34019)"

This reverts commit a67284e.

(cherry picked from commit e26c6dc)
(cherry picked from commit 9341d3e)
frappe-pr-bot pushed a commit that referenced this pull request Feb 24, 2023
## [14.17.1](v14.17.0...v14.17.1) (2023-02-24)

### Reverts

* Revert "fix: Concurrency issues in Sales and Purchase returns" (#34202) ([3c2e21e](3c2e21e)), closes [#34202](#34202) [#34019](#34019)
frappe-pr-bot pushed a commit that referenced this pull request Feb 28, 2023
## [14.17.2](v14.17.1...v14.17.2) (2023-02-28)

### Bug Fixes

* conversion factor not set ([089c7d0](089c7d0))
* currency in coa import ([#34174](#34174)) ([4d92d46](4d92d46))
* default date in Subcontracting reports ([5fce8e2](5fce8e2))
* german translations ([#31732](#31732)) ([88a781f](88a781f))
* incorrect acc depr amount if multiple FBs with straight line or manual method ([dda6bae](dda6bae))
* incorrect color in the BOM Stock Report ([001ed9e](001ed9e))
* manual depr schedule ([971c072](971c072))
* multiple pos conversion issue resolved ([db964e8](db964e8))
* not able to repost gl entries ([ae0318e](ae0318e))
* permission error while calling get_work_order_items ([3ea90ee](3ea90ee))
* pos return throwing amount greater than grand total ([9cd7b27](9cd7b27))
* Remove missing DocField in fetch_from ([dc6ae46](dc6ae46))
* set `from_warehouse` and `to_warehouse` while mapping SE ([80e23d0](80e23d0))
* **test:** use standalone method to fetch work orders from SO ([1719884](1719884))
* ui freeze on item selection in sales invoice ([1750ed4](1750ed4))
* user shouldn't able to make item price for item template ([fb8e45d](fb8e45d))
* zero division error while making LCV ([1859be6](1859be6))

### Performance Improvements

* fetch SLE's on demand and memoize ([db1f17e](db1f17e))

### Reverts

* Revert "fix: Concurrency issues in Sales and Purchase returns" (#34202) ([9341d3e](9341d3e)), closes [#34202](#34202) [#34019](#34019)
@barredterra barredterra mentioned this pull request Mar 7, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14 needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant