Commit Graph

58911 Commits

Author SHA1 Message Date
mergify[bot]
e79b4abe9d fix: ignore historical negative batch stock in outward validation (backport #58148) (backport #58151) (#58153)
fix: ignore historical negative batch stock in outward validation (backport #58148) (#58151)

fix: ignore historical negative batch stock in outward validation (#58148)

(cherry picked from commit 9239d1c2a3)


(cherry picked from commit c18881b37d)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-08-14 11:48:55 +05:30
Frappe PR Bot
81a6f97566 chore(release): Bumped to Version 16.32.0
# [16.32.0](https://github.com/frappe/erpnext/compare/v16.31.1...v16.32.0) (2026-08-11)

### Bug Fixes

* add raw material to its operation even when another operation uses the item ([35f9bec](35f9bec988))
* add type hints to conversion factor API ([dbfe7e1](dbfe7e199e))
* allow non-admin roles to import chart of accounts (backport [#57454](https://github.com/frappe/erpnext/issues/57454)) ([#58060](https://github.com/frappe/erpnext/issues/58060)) ([a707c82](a707c82c0c))
* allow selecting a warehouse for new items in the update items dialog ([#57876](https://github.com/frappe/erpnext/issues/57876)) ([c9977be](c9977be5d4))
* cap a manufacture entry at the job card's pending production ([79ad410](79ad410cc1))
* clear deferred revenue/expense fields on uncheck (backport [#57140](https://github.com/frappe/erpnext/issues/57140)) ([7e72e70](7e72e70cc1))
* **coa_importer:** added server-side validations for importing chart of accounts (backport [#58065](https://github.com/frappe/erpnext/issues/58065)) ([#58066](https://github.com/frappe/erpnext/issues/58066)) ([db22fcb](db22fcb157))
* condition check with empty object for falsy case ([838fb8e](838fb8e8df))
* **consolidated cash flow:** correct totals and labels in section foo… (backport [#57336](https://github.com/frappe/erpnext/issues/57336)) ([#58056](https://github.com/frappe/erpnext/issues/58056)) ([f11d0d5](f11d0d5cec))
* **controllers:** correct negative rate settings link ([51aecec](51aecec598))
* convert hours to minutes in workstation complete_job ([822e6d8](822e6d8924))
* declare precision 9 on all conversion_factor fields ([db49b03](db49b03913))
* derive operation FG items before material expansion, keep the final one the BOM's item ([3e0d0b2](3e0d0b2d68))
* don't demand raw material transfer for semi FG job cards on submit ([99d9d84](99d9d845bd))
* escape `customer_details` on lead creation from appointment (backport [#57947](https://github.com/frappe/erpnext/issues/57947)) ([#57949](https://github.com/frappe/erpnext/issues/57949)) ([dff4ec6](dff4ec6a74))
* field validation and perm checks on `get_stock_reservation_entries_for_voucher` (backport [#57968](https://github.com/frappe/erpnext/issues/57968)) ([#57970](https://github.com/frappe/erpnext/issues/57970)) ([0a9b632](0a9b632925))
* generate the next manufacture entry net of booked process loss ([2548751](2548751673))
* guard reconciliation table deletes when tables are missing ([21fbfa5](21fbfa541d))
* handling negative grand total ([e657a7f](e657a7f19f))
* incorrect batch-wise valuation rate for entries with same posting datetime (backport [#57794](https://github.com/frappe/erpnext/issues/57794)) ([#57797](https://github.com/frappe/erpnext/issues/57797)) ([adfa676](adfa6768c9))
* incorrect entry detection in Stock Ledger Invariant Check ([#57886](https://github.com/frappe/erpnext/issues/57886)) ([f7bae88](f7bae888cf))
* item property updates in POS and transactions and add styling (backport [#57189](https://github.com/frappe/erpnext/issues/57189)) ([#58058](https://github.com/frappe/erpnext/issues/58058)) ([5f43c89](5f43c89c45))
* **job_card:** apply the completion dialog's qty to manufacture ([#57685](https://github.com/frappe/erpnext/issues/57685)) ([d97cf13](d97cf131a1))
* **job_card:** leave the pending qty out of the job card's own output ([#57686](https://github.com/frappe/erpnext/issues/57686)) ([0c79194](0c7919429e))
* **job_card:** reject a completion split that cannot add up ([#57687](https://github.com/frappe/erpnext/issues/57687)) ([3907d93](3907d93f9f))
* **job_card:** require the previous operation to be manufactured ([#57684](https://github.com/frappe/erpnext/issues/57684)) ([a22a7fd](a22a7fddba))
* **journal_entry:** validate blocked purchase invoices ([04718e1](04718e15c9))
* **journal_entry:** validation message for blocked purchase invoice ([#57896](https://github.com/frappe/erpnext/issues/57896)) ([f0adbd2](f0adbd2bd3))
* keep asset repair downtime in sync with entered dates ([ca5418e](ca5418e2c9))
* keep job card actions visible for corrective job cards ([4ee276d](4ee276d3db))
* keep source rate on re-fetch when maintain same rate is enabled (backport [#57479](https://github.com/frappe/erpnext/issues/57479)) ([#57792](https://github.com/frappe/erpnext/issues/57792)) ([ee5316e](ee5316ecd0))
* keep Target Warehouse optional for work orders tracking semi finished goods ([c598cf9](c598cf9010))
* keep the transfer qty check for legacy semi FG cards without an FG item ([f810d78](f810d780c0))
* **manufacturing:** adapt version 16 compatibility ([a8060d5](a8060d5e99))
* **manufacturing:** align quantity split rounding ([317dd18](317dd18ce5))
* **manufacturing:** avoid child BOM cache lookups ([fb87751](fb877515ca))
* **manufacturing:** correct nested BOM quantities ([b4929e2](b4929e2737))
* **manufacturing:** keep item code searchable when a barcode matches the same text ([87c4009](87c4009572))
* **manufacturing:** type whitelisted BOM arguments ([87b456f](87b456faa2))
* mirror rounding adjustment on distributed_discount_amount (backport [#58047](https://github.com/frappe/erpnext/issues/58047)) ([#58055](https://github.com/frappe/erpnext/issues/58055)) ([d680115](d680115fcb))
* optimize product bundle item search ([2934971](29349711e4))
* preserve custom title on new JV (backport [#57987](https://github.com/frappe/erpnext/issues/57987)) ([#57989](https://github.com/frappe/erpnext/issues/57989)) ([4a2163e](4a2163ebf8))
* preserve original operation idx in manually created Job Cards ([fee003a](fee003a82d))
* purchase return of batchwise valuation batch valued at original receipt rate instead of batch avg rate (version-16-hotfix) ([#57836](https://github.com/frappe/erpnext/issues/57836)) ([aa70d9b](aa70d9bbc3))
* re-check future sle before queuing repost on submit ([#57664](https://github.com/frappe/erpnext/issues/57664)) ([#57961](https://github.com/frappe/erpnext/issues/57961)) ([2b020c2](2b020c2fcf))
* reflect in-invoice receivable settlements in Sales Register ledger view ([a90907f](a90907fda6))
* **regional:** rename Italy's duplicate Customer name fields ([f56867d](f56867d843)), closes [#46281](https://github.com/frappe/erpnext/issues/46281) [#50915](https://github.com/frappe/erpnext/issues/50915) [#57215](https://github.com/frappe/erpnext/issues/57215) [#50921](https://github.com/frappe/erpnext/issues/50921) [#53409](https://github.com/frappe/erpnext/issues/53409)
* repost read stale sibling SLE rate for moving average returns ([ffa65b0](ffa65b0c48))
* require FG / Semi FG Item on operations when tracking semi finished goods ([03eeb83](03eeb839fb))
* require material transfer before job card start and completion ([a7f75de](a7f75de1aa))
* require WIP warehouse for work orders tracking semi finished goods ([24cd5f2](24cd5f22b5))
* roll up process loss to the work order for semi finished goods ([27130d8](27130d8e49))
* round computed conversion factors to field precision ([206ed28](206ed28924))
* round production plan mr_items quantity to field precision ([2d056ae](2d056aee3d))
* **sales-invoice:** respect Customize Form hidden setting on Update Stock ([#57819](https://github.com/frappe/erpnext/issues/57819)) ([0e26f9b](0e26f9b1db))
* scale generated raw materials to the manufacture entry's production share ([acba994](acba9945b0))
* scope manufacture entry process loss to its own job card ([a0b370b](a0b370b2e9)), closes [frappe/erpnext#57892](https://github.com/frappe/erpnext/issues/57892)
* **selling:** bill re-delivered sales order quantities ([6fb09b1](6fb09b1e21))
* **selling:** preserve explicit UOM during item selection ([218397e](218397e78d))
* **selling:** read overdue amount from payment ledger, not gl tags (backport [#57786](https://github.com/frappe/erpnext/issues/57786)) ([#58057](https://github.com/frappe/erpnext/issues/58057)) ([b89229a](b89229a93d))
* **selling:** reset stale item details on item change ([b5d727f](b5d727fb81))
* set `restrict_globals=True` in `frappe.render_template` (backport [#57899](https://github.com/frappe/erpnext/issues/57899)) ([#57902](https://github.com/frappe/erpnext/issues/57902)) ([6b45002](6b45002abc))
* **setup:** fetch driver address by supplier link ([62a851b](62a851bebb))
* skip incoming rate calc when serial no qty is zero (backport [#57427](https://github.com/frappe/erpnext/issues/57427)) ([#57957](https://github.com/frappe/erpnext/issues/57957)) ([a4d9411](a4d9411345))
* skip PO items with invoice-created receipts in billing repair patch ([9139994](9139994686))
* skip the pending production check on update-after-submit saves ([491f9fa](491f9fa3fe))
* **stock:** drop call to confirm_if_drafts_exist missing on v16 ([#57833](https://github.com/frappe/erpnext/issues/57833)) ([626e351](626e35135f))
* **stock:** handle multi-item opening balance in Stock Ledger report (backport [#57591](https://github.com/frappe/erpnext/issues/57591)) ([#57796](https://github.com/frappe/erpnext/issues/57796)) ([af3184c](af3184c8b4))
* **stock:** repair duplicated purchase receipt billing ([fa733e6](fa733e691b))
* **stock:** validate new warehouse inventory account after naming ([fce0eb1](fce0eb1577))
* **stock:** validate warehouse accounts when used ([0dfa54f](0dfa54f812))
* stop asking for a manufacturing entry when process loss explains the shortfall ([104c8df](104c8df765))
* **subscription:** don't reactivate a cancelled subscription (backport [#57774](https://github.com/frappe/erpnext/issues/57774))  ([eeb3cd2](eeb3cd238e)), closes [#57761](https://github.com/frappe/erpnext/issues/57761) [#56796](https://github.com/frappe/erpnext/issues/56796) [#56796](https://github.com/frappe/erpnext/issues/56796) [#57780](https://github.com/frappe/erpnext/issues/57780)
* sync open reference forms after Quality Inspection updates them ([33eb619](33eb6199d9))
* sync translations from crowdin ([#57841](https://github.com/frappe/erpnext/issues/57841)) ([a9d139a](a9d139ae6b))
* sync translations from crowdin ([#58069](https://github.com/frappe/erpnext/issues/58069)) ([f697b02](f697b024db))
* tolerate floating-point drift in sales team allocated percentage ([39f15bb](39f15bb3e9))
* use stock settings for warehouse defaults ([d8bbe86](d8bbe865a8))
* validate webform for project ([8d98fe8](8d98fe8187))
* zero-rate repost fallback could still read sibling SLE ([81f81ff](81f81fff32))

### Features

* **job_card:** print quantities with their stock uom ([#57689](https://github.com/frappe/erpnext/issues/57689)) ([eb90186](eb90186d3f))
* stock validations in Period Closing Voucher and snapshot-seeded batch valuation (backport [#57811](https://github.com/frappe/erpnext/issues/57811)) ([#57816](https://github.com/frappe/erpnext/issues/57816)) ([243266f](243266f5ef))
* sync serial no status from stock ledger in Stock Qty vs Serial No Count report (version-16-hotfix) ([#57864](https://github.com/frappe/erpnext/issues/57864)) ([ea5cbb1](ea5cbb116c))
v16.32.0
2026-08-11 23:39:40 +00:00
Diptanil Saha
b27bc42d51 Merge pull request #58024 from frappe/version-16-hotfix
chore: release v16
2026-08-12 05:08:00 +05:30
MochaMind
f697b024db fix: sync translations from crowdin (#58069) 2026-08-11 23:27:27 +00:00
mergify[bot]
db22fcb157 fix(coa_importer): added server-side validations for importing chart of accounts (backport #58065) (#58066)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-08-11 22:15:08 +00:00
MochaMind
a9d139ae6b fix: sync translations from crowdin (#57841)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2026-08-12 01:17:44 +05:30
mergify[bot]
d680115fcb fix: mirror rounding adjustment on distributed_discount_amount (backport #58047) (#58055)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2026-08-11 18:38:32 +00:00
mergify[bot]
a707c82c0c fix: allow non-admin roles to import chart of accounts (backport #57454) (#58060)
Co-authored-by: Vishnu Priya Baskaran <145791817+ervishnucs@users.noreply.github.com>
2026-08-12 00:03:02 +05:30
mergify[bot]
5f43c89c45 fix: item property updates in POS and transactions and add styling (backport #57189) (#58058)
Co-authored-by: Vishnu Priya Baskaran <145791817+ervishnucs@users.noreply.github.com>
Co-authored-by: Afsal Syed <afsalsyed12@gmail.com>
2026-08-11 17:32:18 +00:00
Diptanil Saha
b89229a93d fix(selling): read overdue amount from payment ledger, not gl tags (backport #57786) (#58057)
Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com>
2026-08-11 16:52:10 +00:00
mergify[bot]
f11d0d5cec fix(consolidated cash flow): correct totals and labels in section foo… (backport #57336) (#58056)
Co-authored-by: Vishnu Priya Baskaran <145791817+ervishnucs@users.noreply.github.com>
2026-08-11 16:42:43 +00:00
Mihir Kandoi
0637bdad11 Merge pull request #58053 from frappe/mergify/bp/version-16-hotfix/pr-58051
fix(selling): reset stale item details on item change (backport #58051)
2026-08-11 21:48:39 +05:30
Mihir Kandoi
bc6cb75bf4 chore: resolve conflict 2026-08-11 21:19:00 +05:30
Mihir Kandoi
218397e78d fix(selling): preserve explicit UOM during item selection
(cherry picked from commit e8c890a844)

# Conflicts:
#	erpnext/utilities/transaction_base.py
2026-08-11 15:36:19 +00:00
Mihir Kandoi
b5d727fb81 fix(selling): reset stale item details on item change
(cherry picked from commit 009961edc7)
2026-08-11 15:36:18 +00:00
Mihir Kandoi
7fd507ec3f Merge pull request #58040 from mihir-kandoi/backport-58036-version-16-hotfix
fix(stock): validate warehouse accounts when used (backport #58036)
2026-08-11 18:56:16 +05:30
Mihir Kandoi
4255249363 Merge pull request #58043 from mihir-kandoi/fix-po-invoice-billing-distribution-version-16
fix: distribute PO-invoice billed amount across receipts without duplication (backport #58021)
2026-08-11 18:55:15 +05:30
Mihir Kandoi
c8d0d457cb chore(stock): drop redundant supplier warehouse comment 2026-08-11 18:30:57 +05:30
Mihir Kandoi
f1ca9e2631 test(stock): cover named validation error and same-transaction parent inheritance 2026-08-11 18:30:22 +05:30
Mihir Kandoi
fce0eb1577 fix(stock): validate new warehouse inventory account after naming
Move the insert-time check from before_insert to validate. before_insert
runs before set_new_name, so the validation message rendered the
warehouse name as None. validate runs after naming and only applies to
new documents via is_new().

Resolve inheritance through the parent's lft/rgt bounds instead of the
request-cached warehouse account map. The cached map can be stale within
a request (a parent created moments earlier is missing from it), which
made get_warehouse_account trigger a full nested-set rebuild_tree and
could falsely reject a child whose parent carries a valid account.
rebuild_tree enables auto_commit_on_many_writes, which must not run
inside a document insert.
2026-08-11 18:30:22 +05:30
Mihir Kandoi
e9b7d8195b test: cover repair patch exclusion for invoice-created receipts
(cherry picked from commit d34519f536)
2026-08-11 18:28:46 +05:30
Mihir Kandoi
9139994686 fix: skip PO items with invoice-created receipts in billing repair patch
A Purchase Receipt row created from a Purchase Invoice carries both
purchase_order_item and purchase_invoice_item, and its billed_amt is pinned
to the row amount by update_billing_status. Redistributing the PO-invoiced
pool over such rows zeroes the invoice-created receipt and flips it from
Completed to To Bill, so the repair leaves those PO Items untouched.

(cherry picked from commit ace4230f97)
2026-08-11 18:28:19 +05:30
Mihir Kandoi
fa733e691b fix(stock): repair duplicated purchase receipt billing
(cherry picked from commit 8b7e04eae1)
2026-08-11 18:28:19 +05:30
Mihir Kandoi
0dfa54f812 fix(stock): validate warehouse accounts when used 2026-08-11 18:16:47 +05:30
Mihir Kandoi
675901d801 Merge pull request #58023 from frappe/mergify/bp/version-16-hotfix/pr-58020
fix(setup): fetch driver address by supplier link (backport #58020)
2026-08-11 15:31:19 +05:30
Mihir Kandoi
62a851bebb fix(setup): fetch driver address by supplier link
(cherry picked from commit 3ffb888d26)
2026-08-11 09:48:17 +00:00
Mihir Kandoi
c8614d42ae Merge pull request #58017 from mihir-kandoi/backport-58016-v16
fix: preserve original operation idx in manually created Job Cards (backport #58016)
2026-08-11 14:20:32 +05:30
Mihir Kandoi
fee003a82d fix: preserve original operation idx in manually created Job Cards
The Create Job Card dialog on Work Order lists only pending operations,
so the row idx sent to make_job_card is the dialog's position, not the
Work Order Operation idx. create_job_card stamped that dialog idx into
operation_row_id, and get_required_items then matched raw materials of
whichever operation held that idx originally.

Resolve idx server-side from the Work Order Operation row that
get_operation_details already looks up by name.

Fixes https://github.com/frappe/erpnext/issues/57985
2026-08-11 14:08:20 +05:30
Mihir Kandoi
2764ebe686 Merge pull request #58012 from mihir-kandoi/backport-58003-version-16-hotfix
fix(selling): bill re-delivered sales order quantities (backport #58003)
2026-08-11 14:01:46 +05:30
Mihir Kandoi
a5f0b6605e chore(selling): annotate make_sales_invoice arguments 2026-08-11 13:49:52 +05:30
Mihir Kandoi
3d134bdd60 Merge pull request #58014 from frappe/mergify/bp/version-16-hotfix/pr-58009
fix: require material transfer before job card start and completion (backport #58009)
2026-08-11 13:48:01 +05:30
Mihir Kandoi
4ee276d3db fix: keep job card actions visible for corrective job cards
Corrective job cards regenerate required items but are exempt from the
transfer gate on the server; mirror that exemption in materials_ready.

(cherry picked from commit e9533495fc)
2026-08-11 08:02:27 +00:00
Mihir Kandoi
94e4c53b8b test: job card start and completion blocked until material transfer
(cherry picked from commit c95705dc64)
2026-08-11 08:02:27 +00:00
Mihir Kandoi
a7f75de1aa fix: require material transfer before job card start and completion
When the work order transfers material against Job Card, the Start Job
and Complete Job actions (and the whitelisted start_timer and
complete_job_card methods behind them) accepted work before any
Material Transfer for Manufacture existed; the transfer gate only fired
on job card submission.

Run validate_transfer_qty on both actions, and drop the finished_good
escape in materials_ready so the dashboard hides the buttons while
transfer is pending. Job cards that skip material transfer, corrective
job cards, and work orders transferring against Work Order are exempt,
as on submit.

(cherry picked from commit 808b2e2984)
2026-08-11 08:02:26 +00:00
Mihir Kandoi
0440c971b2 test(selling): cover invoicing after returns and re-deliveries 2026-08-11 13:26:01 +05:30
Mihir Kandoi
6fb09b1e21 fix(selling): bill re-delivered sales order quantities 2026-08-11 13:26:01 +05:30
Mihir Kandoi
4229161f4f Merge pull request #58007 from frappe/codex/backport-57963-version-16
fix(manufacturing): correct nested BOM Explorer quantities
2026-08-11 13:25:00 +05:30
Mihir Kandoi
fb877515ca fix(manufacturing): avoid child BOM cache lookups 2026-08-11 13:13:03 +05:30
Mihir Kandoi
b4929e2737 fix(manufacturing): correct nested BOM quantities 2026-08-11 13:00:13 +05:30
Mihir Kandoi
b75146445b Merge pull request #58002 from frappe/mergify/bp/version-16-hotfix/pr-57997
fix: keep item code searchable when a barcode matches the same text (backport #57997)
2026-08-11 12:42:51 +05:30
Kaushal Shriwas
60eab30bab chore: resolve backport conflict in bom.py 2026-08-11 12:23:00 +05:30
Mihir Kandoi
d315c15cee Merge pull request #57999 from frappe/mergify/bp/version-16-hotfix/pr-57972
refactor: drop redundant time_in_mins assignment in workstation complete_job (backport #57972)
2026-08-11 12:21:38 +05:30
Kaushal Shriwas
062976123a test(manufacturing): cover BOM item search when item code collides with a barcode
(cherry picked from commit 23024d1ea9)
2026-08-11 06:43:20 +00:00
Kaushal Shriwas
87c4009572 fix(manufacturing): keep item code searchable when a barcode matches the same text
(cherry picked from commit bf5d506637)

# Conflicts:
#	erpnext/manufacturing/doctype/bom/mapper.py
2026-08-11 06:43:20 +00:00
Mihir Kandoi
631cc2c218 refactor: drop redundant time_in_mins assignment in complete_job
(cherry picked from commit 3cffeb68e3)
2026-08-11 06:39:43 +00:00
pandiyan
822e6d8924 fix: convert hours to minutes in workstation complete_job
`time_diff_in_hours` returns hours, so `time_in_mins` needs `* 60`, not
`/ 60`. Matches `Job Card.validate_time_log_row`.

No behaviour change: the `doc.save()` on the next line runs Job Card's
`validate`, which recomputes `time_in_mins` correctly before the row is
written. This only stops the expression from reading as a bug.

(cherry picked from commit 422a9161dd)
2026-08-11 06:39:43 +00:00
Jatin3128
ee5316ecd0 fix: keep source rate on re-fetch when maintain same rate is enabled (backport #57479) (#57792)
* fix: keep source rate on re-fetch when maintain same rate is enabled (#57479)

* fix: type-annotate get_item_details arguments

---------

Co-authored-by: test <test@test.com>
2026-08-11 11:00:00 +05:30
mergify[bot]
fea1ec867e refactor(queries): using frappe.get_query in get_filtered_child_rows (backport #57991) (#57993)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-08-10 19:45:16 +00:00
mergify[bot]
4a2163ebf8 fix: preserve custom title on new JV (backport #57987) (#57989)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
Co-authored-by: rehanrehman389 <rehanrehman389@gmail.com>
2026-08-10 22:03:49 +05:30
mergify[bot]
0a9b632925 fix: field validation and perm checks on get_stock_reservation_entries_for_voucher (backport #57968) (#57970)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-08-10 09:36:20 +00:00