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(subcontracting): Added provision to create multiple Subcontracting Orders against a single Purchase Order (backport #44711) #44782

Merged

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 18, 2024

Made changes to fulfil issue #43986

Current flow: Only a single Subcontracting Order could be made against a Subcontracted Purchase Order

New flow: User can now create multiple Subcontracting Orders against a single Purchase Order

  1. Checks for existing Subcontracting Order has been removed
  2. Upon creating a new Subcontracting Order, a new check has been added which will throw and error if user is trying to create a new SO against a PO which has been fully subcontracted

How to use: When creating a Subcontracting Order, user now has the ability to change the quantity of finished good item, hence enabling them to create a SO which partly fulfils the corresponding PO

Notes:

  1. An error will be thrown if quantity entered is higher than available subcontracting quantity (fetched from the PO)
  2. Upon creating a new Subcontracted Order, the line items will by default have the quantity as the remaining/available quantity to subcontract

https://docs.frappe.io/erpnext/user/manual/en/subcontracting


This is an automatic backport of pull request #44711 done by Mergify.

…ng Orders against a single Purchase Order (#44711)

* feat(subcontracting): Added provision to create multiple Subcontracting Orders from a single Subcontracted Purchase Order

* refactor(new_sc_flow_2): Fixed error thrown by semgrep

(cherry picked from commit 3eba6bf)

# Conflicts:
#	erpnext/buying/doctype/purchase_order/purchase_order.js
#	erpnext/buying/doctype/purchase_order/test_purchase_order.py
#	erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
#	erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json
#	erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.json
Copy link
Contributor Author

mergify bot commented Dec 18, 2024

Cherry-pick of 3eba6bf has failed:

On branch mergify/bp/version-15-hotfix/pr-44711
Your branch is up to date with 'origin/version-15-hotfix'.

You are currently cherry-picking commit 3eba6bf3dd.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   erpnext/buying/doctype/purchase_order/purchase_order.py
	modified:   erpnext/buying/doctype/purchase_order_item/purchase_order_item.py
	modified:   erpnext/controllers/subcontracting_controller.py
	modified:   erpnext/controllers/tests/test_subcontracting_controller.py
	modified:   erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.js
	modified:   erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py
	modified:   erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py
	modified:   erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py
	modified:   erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   erpnext/buying/doctype/purchase_order/purchase_order.js
	both modified:   erpnext/buying/doctype/purchase_order/test_purchase_order.py
	both modified:   erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
	both modified:   erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json
	both modified:   erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.json

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

…ng Orders against a single Purchase Order (#44711)

* feat(subcontracting): Added provision to create multiple Subcontracting Orders from a single Subcontracted Purchase Order

* refactor(new_sc_flow_2): Fixed error thrown by semgrep
@mihir-kandoi mihir-kandoi force-pushed the mergify/bp/version-15-hotfix/pr-44711 branch 2 times, most recently from 463531d to 71e148f Compare December 19, 2024 07:48
@mihir-kandoi mihir-kandoi force-pushed the mergify/bp/version-15-hotfix/pr-44711 branch from 71e148f to e67d0b9 Compare December 19, 2024 07:51
@rohitwaghchaure rohitwaghchaure merged commit 8f81172 into version-15-hotfix Dec 20, 2024
11 checks passed
@rohitwaghchaure rohitwaghchaure deleted the mergify/bp/version-15-hotfix/pr-44711 branch December 20, 2024 06:48
frappe-pr-bot pushed a commit that referenced this pull request Dec 25, 2024
# [15.47.0](v15.46.2...v15.47.0) (2024-12-25)

### Bug Fixes

* 'str' object has no attribute 'get_sql' ([8b810f5](8b810f5))
* add `Stock UOM` when adding new item in POS list ([#44780](#44780)) ([96cc9e2](96cc9e2))
* Add hooks for repost allowed doctypes ([b5596d9](b5596d9))
* added docs.frappe.io in documentation_url ([#44776](#44776)) ([0fd7792](0fd7792))
* asset field precision check ([516a325](516a325))
* avg. buying amount for product bundle item with serial and batch no in gross profit report ([2edb6f3](2edb6f3))
* better indicator base amount for Tax Witholding in Journal Entry ([218e777](218e777))
* buying rate for service item in gross profit report ([a55aaea](a55aaea))
* closing stock balance permissions (backport [#44791](#44791)) ([#44793](#44793)) ([cdeec8d](cdeec8d))
* correct args for get_advance_payment_entries_for_regional ([875797e](875797e))
* correct tds rate with lower deduction certificate ([5ca60f3](5ca60f3))
* do not set cost_center update_voucher_balance as it is set in init_voucher_balance ([19a8ea2](19a8ea2))
* do not validate qc for scrap item (backport [#44844](#44844)) ([#44853](#44853)) ([8092d58](8092d58))
* Duplicate entry ' EF1DE8B2E1B6' for key 'PRIMARY' (backport [#44809](#44809)) ([#44814](#44814)) ([16b013f](16b013f))
* fetch tax withholding category from the voucher ([8f8dd1c](8f8dd1c))
* incoming rate should be zero for rejected items (backport [#44857](#44857)) ([#44859](#44859)) ([0969877](0969877))
* incorrect Material Transferred for Manufacturing qty (backport [#44823](#44823)) ([#44832](#44832)) ([497029f](497029f))
* Ledger repost support for extending app doctypes ([d137f78](d137f78))
* Paid + Write Off Amount issue in Sales Invoice (backport [#44763](#44763)) ([#44874](#44874)) ([ca7c229](ca7c229))
* permissions for marking Quotation as lost ([e6390bf](e6390bf))
* POS Closing entry issue (backport [#44772](#44772)) ([#44781](#44781)) ([2032422](2032422))
* posting_time issue ([#44870](#44870)) ([7a5c30f](7a5c30f))
* Remove typo ([13a3c81](13a3c81))
* set project in GL from the SLE (backport [#44879](#44879)) ([#44885](#44885)) ([57e6ed4](57e6ed4))
* show profit and loss after period closing ([771632a](771632a))
* slow posting datetime update (backport [#44799](#44799)) ([#44805](#44805)) ([ad57e33](ad57e33))
* stock entry not fetching expired batches (backport [#44863](#44863)) ([#44868](#44868)) ([d6001e5](d6001e5))
* Stock Entry uses incorrect company when generated from Pick List ([#44679](#44679)) ([58e8467](58e8467))
* Swedish tax templates ([cc1834b](cc1834b))
* test case correction ([ddfead2](ddfead2))
* typerror on TDS payable monthly report (backport [#37707](#37707)) ([db9a319](db9a319))
* update correct cost center in Accounts Receivable Report ([4c5540a](4c5540a))
* update query ([3ab4acf](3ab4acf))
* use utility method to generate url ([75aee42](75aee42))
* **ux:** purchase invoice link in error message ([#44797](#44797)) ([01c1ed9](01c1ed9))
* Warehouse wise Stock Value chart roles (backport [#44865](#44865)) ([#44867](#44867)) ([f32cf84](f32cf84))

### Features

* add difference_posting_date field ([bec1f97](bec1f97))
* **subcontracting:** Added provision to create multiple Subcontracting Orders against a single Purchase Order (backport [#44711](#44711)) ([#44782](#44782)) ([8f81172](8f81172))
* swedish COA ([98cc79d](98cc79d))
* use difference_posting_date for journal entry posting_date ([7498cdf](7498cdf))

### Performance Improvements

* SABB (backport [#44764](#44764)) ([#44789](#44789)) ([b706a82](b706a82))
* slow query related to stock ledger entry (backport [#44861](#44861)) ([#44862](#44862)) ([3f3df7e](3f3df7e))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants