Commit Graph

56087 Commits

Author SHA1 Message Date
Sudharsanan Ashok
54ac519bec Merge pull request #59164 from frappe/mergify/bp/version-15-hotfix/pr-59160
fix(stock): forward company to outward batch lookup (backport #59160)
2026-09-18 18:27:01 +05:30
Khushi Rawat
a7151374bb Merge pull request #59183 from frappe/mergify/bp/version-15-hotfix/pr-59181
fix(accounts): clarify revaluation journal filters (backport #59181)
2026-09-18 17:57:44 +05:30
pandiyan
a602153753 fix(accounts): clarify revaluation journal filters
(cherry picked from commit dc4b390a9b)
2026-09-18 12:23:17 +00:00
Sudharsanan Ashok
f73cdb37bf Merge pull request #59158 from frappe/mergify/bp/version-15-hotfix/pr-59155
fix(stock): continue putaway allocation after undersized whole-uom rules (backport #59155)
2026-09-18 15:16:10 +05:30
Pandiyan P
f5f7d04fd5 fix(stock): forward company to outward batch lookup (#59160)
(cherry picked from commit 622b7e0caa)
2026-09-18 09:07:07 +00:00
Khushi Rawat
fc1d5975e9 Merge pull request #59162 from frappe/mergify/bp/version-15-hotfix/pr-59142
fix: validate shipping rule account company (backport #59142)
2026-09-18 14:36:57 +05:30
Khushi Rawat
0983fb1e9c Merge pull request #59156 from frappe/mergify/bp/version-15-hotfix/pr-59081
fix(accounts): validate bank reconciliation date ranges (backport #59081)
2026-09-18 14:23:38 +05:30
pandiyan
e6930317ae fix(stock): continue putaway allocation after undersized whole-uom rules (#59155)
(cherry picked from commit 6cc500e28d)
2026-09-18 14:16:00 +05:30
pandiyan
7186e45de9 test: cover shipping rule account company validation
(cherry picked from commit 022ee73d78)

# Conflicts:
#	erpnext/accounts/doctype/shipping_rule/test_shipping_rule.py
2026-09-18 14:11:20 +05:30
pandiyan
e54bf6fe43 fix: validate shipping rule account company
(cherry picked from commit 340feb94a1)
2026-09-18 08:37:12 +00:00
pandiyan
355033d40f test: cover bank reconciliation date validation
(cherry picked from commit 62d0e2c82e)

# Conflicts:
#	erpnext/accounts/doctype/bank_reconciliation_tool/test_bank_reconciliation_tool.py
2026-09-18 13:54:26 +05:30
pandiyan
dcff5c3149 fix: validate bank reconciliation date ranges
(cherry picked from commit 970f32a342)

# Conflicts:
#	erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py
2026-09-18 13:53:14 +05:30
Sudharsanan Ashok
22a860d380 Merge pull request #59089 from frappe/mergify/bp/version-15-hotfix/pr-58923
fix(stock): filter item group defaults by company and non-group records (backport #58923)
2026-09-18 11:12:11 +05:30
rohitwaghchaure
dc08520197 perf: reduce memory consumption during reposting (#59117)
* perf: reduce memory consumption during reposting

The reposting queue introduced in #52152 keeps the complete future stock
ledger of every transitively dependent item-warehouse in a single deque.
Each `select *` row is ~3.5KB, so a repost spanning a million entries
needs several GB and gets OOM killed on smaller workers.

- Queue only the identity and sort keys of an entry, and fetch the full
  row in batches of 500 just before it is processed
- Move `for update` off the bulk prefetch onto the batch, so millions of
  rows are no longer locked for the whole duration of the repost
- Drop the process local document cache and message log at every
  checkpoint, neither is evicted within a long running job

* fix: keep recent repost messages and log skipped entries

Trimming `frappe.local.message_log` to empty at every checkpoint discarded
warnings that the Repost Item Valuation failure handler reads back when
building the error log. Keep the most recent messages instead, which bounds
the growth just as well.

Also log when a queued entry is no longer active by the time its batch is
loaded, rather than skipping it silently.

* fix: skip reposts already covered by a Manufacture/Repack dependant repost

While reposting a raw material, the finished goods produced from it are
reposted as dependants, from the posting datetime of the manufacture entry
through to the end of their ledger. A repost queued separately for the same
finished good and warehouse at a later datetime therefore has nothing left to
do, but it was still picked up and walked the same entries again.

Track the item-warehouse combinations pulled in as dependants of a Manufacture
or Repack entry, and mark the redundant queued reposts as Skipped once the
dependants have been reposted. This runs per item being reposted, so the
finished good's queued repost is released without waiting for the whole raw
material repost to finish.

Only 'Item and Warehouse' reposts are skipped. A 'Transaction' repost spans
several item-warehouse combinations, so covering one says nothing about the
rest. Reposts starting before the manufacture entry still have work to do and
are left queued.

* fix: don't lock the whole repost queue prefetch

* test: repost covers every entry once across batches
2026-09-18 09:02:56 +05:30
Sudharsanan Ashok
1ad584fddc Merge pull request #59118 from frappe/mergify/bp/version-15-hotfix/pr-59104
fix(stock): allow zero completed quantity and handle process loss in job cards (backport #59104)
2026-09-17 19:22:55 +05:30
Sudharsanan Ashok
d6d0400f76 Merge pull request #59087 from frappe/mergify/bp/version-15-hotfix/pr-58998
fix(stock): use stored posting_datetime when reposting stock ledger entries (backport #58998)
2026-09-17 18:47:19 +05:30
Sudharsanan11
ed33afd0fa fix: resolve conflicts 2026-09-17 18:28:07 +05:30
Sudharsanan Ashok
c7893b8444 fix(stock): use stored posting_datetime when reposting stock ledger entries (#58998)
* fix(stock): use stored posting_datetime for repost boundary

get_stock_ledger_entries re-derived posting_datetime from posting_date and
posting_time on every call, discarding the stored value its callers pass in.
when a row's stored posting_datetime differs from that pair, the replay window
is built from the wrong instant: the row falls outside the range filter and is
never recomputed, while get_previous_sle still selects it as the opening
balance and reuses its stale qty_after_transaction. every later entry inherits
the error, leaving bin qty adrift from the sum of its ledger.

derive the boundary only when the caller has not supplied one.

* fix(stock): match current voucher sle on stored posting_datetime

get_sle_against_current_voucher selected rows with an equality check against a
posting_datetime re-derived from posting_date and posting_time. a row whose
stored posting_datetime differs from that pair matches nothing, so reposting
the voucher silently processes zero entries and the row can never be corrected
through its own voucher.

read the timestamp from the stored row when the sle is known, and derive it
only as a fallback.

* test(stock): cover repost with diverged posting_datetime

add a repack scenario whose incoming entry stores a posting_datetime one
microsecond before its own posting_time. asserts the voucher lookup still
finds that entry, and that reposting replays it instead of reusing its stale
qty_after_transaction, which otherwise left bin qty at 115 against 615 of
recorded movements.

(cherry picked from commit 6cee9c330c)

# Conflicts:
#	erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py
2026-09-17 18:28:07 +05:30
Afsal Syed
1e862b232c fix(stock): allow zero completed quantity and handle process loss in job cards (#59104)
(cherry picked from commit 1d8ce1ee8c)
2026-09-17 18:07:54 +05:30
Sudharsanan Ashok
f6b2708f4e Merge pull request #59095 from frappe/mergify/bp/version-15-hotfix/pr-58899
fix: clear stock value for zero-quantity balances (backport #58899)
2026-09-17 11:10:24 +05:30
pandiyan
65d2a07596 fix: clear stock value for zero-quantity balances (#58899)
* fix: clear stock value for zero-quantity balances

* test(stock): cover zero-quantity residual stock values

(cherry picked from commit b439bdda68)
2026-09-17 10:52:56 +05:30
rohitwaghchaure
0130d287f6 perf: skip legacy batch ledger lookups when no legacy entry exists (#59110)
* perf: skip legacy batch ledger lookups when no legacy entry exists
2026-09-16 11:45:49 +00:00
Shllokkk
30cfb2094f Merge pull request #59107 from frappe/mergify/bp/version-15-hotfix/pr-59078
fix: render letter head jinja in statement of accounts pdf (backport #59078)
2026-09-16 16:44:20 +05:30
rohitwaghchaure
a37725b6b9 fix: negative stock value for moving average item with mixed batchwise valuation (#59102)
* fix: negative stock value for moving average item with mixed batchwise valuation

* test: cover fallback rate and equal timestamp valuation paths
2026-09-16 16:29:06 +05:30
mergify[bot]
db2e9efab4 fix: update modified for last purchase rate (backport #59044) (#59105)
fix: update modified for last purchase rate (#59044)

(cherry picked from commit f6b907ef9d)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-09-16 10:14:44 +00:00
Shllokkk
b8a53b800a fix: render letter head jinja in statement of accounts pdf
(cherry picked from commit da377683d6)
2026-09-16 10:10:12 +00:00
Vishnu Priya Baskaran
a7aae8b21a fix: prevent max recursion on supplier scorecard save (#58706) 2026-09-16 13:12:03 +05:30
pandiyan
50b6b850e4 fix(stock): filter item group defaults by company and non-group records (#58923)
(cherry picked from commit 00ee694444)
2026-09-16 12:05:13 +05:30
Sudharsanan Ashok
b4dd2ee80f Merge pull request #59015 from frappe/mergify/bp/version-15-hotfix/pr-58994
fix(stock): calculate batch bundle valuation per unit (backport #58994)
2026-09-16 11:03:50 +05:30
mergify[bot]
e2830089fb fix: resolve code lists by URI and version (backport #58770) (#58771)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2026-09-16 02:37:15 +02:00
Sudharsanan Ashok
641f8e56a2 Merge pull request #59012 from frappe/mergify/bp/version-15-hotfix/pr-58997
fix: prevent disabled items from being used in BOM (backport #58997)
2026-09-15 22:07:10 +05:30
Sudharsanan Ashok
f6bac4c6ee Merge pull request #59077 from frappe/mergify/bp/version-15-hotfix/pr-58925
fix(stock): set item_name to fetch if empty in packing slip item (backport #58925)
2026-09-15 18:55:46 +05:30
mergify[bot]
112350dd65 fix(regional)!: remove irs_1099_print whitelisted method (backport #58976) (#58991)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-09-15 18:40:22 +05:30
Afsal Syed
99afc2e6eb fix(stock): set item_name to fetch if empty in packing slip item (#58925)
(cherry picked from commit f130c64530)

# Conflicts:
#	erpnext/stock/doctype/packing_slip_item/packing_slip_item.json
2026-09-15 18:35:56 +05:30
Sudharsanan Ashok
1c576a6f1c Merge pull request #59075 from frappe/revert-58942-mergify/bp/version-15-hotfix/pr-58925
Revert "fix(stock): set item_name to fetch if empty in packing slip item (backport #58925)"
2026-09-15 18:05:44 +05:30
Sudharsanan Ashok
618864a051 Revert "fix(stock): set item_name to fetch if empty in packing slip item (backport #58925)" 2026-09-15 17:47:47 +05:30
Sudharsanan Ashok
d9ea9a5430 Merge pull request #58942 from frappe/mergify/bp/version-15-hotfix/pr-58925
fix(stock): set item_name to fetch if empty in packing slip item (backport #58925)
2026-09-15 17:42:52 +05:30
Afsal Syed
9ba2159720 fix(stock): set item_name to fetch if empty in packing slip item (#58925)
(cherry picked from commit f130c64530)

# Conflicts:
#	erpnext/stock/doctype/packing_slip_item/packing_slip_item.json
2026-09-15 16:38:36 +05:30
Sudharsanan Ashok
602803cce0 Merge pull request #59040 from frappe/mergify/bp/version-15-hotfix/pr-58965
fix(subcontracting): validate project across the subcontracting flow  (backport #58965)
2026-09-13 17:53:20 +05:30
Sudharsanan11
e84a94642d fix: resolve conflicts 2026-09-13 12:12:16 +05:30
Sudharsanan Ashok
1150d8e9b0 fix(subcontracting): validate project across the subcontracting flow (#58965)
(cherry picked from commit fe25746feb)

# Conflicts:
#	erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py
#	erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py
#	erpnext/subcontracting/doctype/subcontracting_receipt/mapper.py
2026-09-13 06:29:16 +00:00
pandiyan
7429a260f6 fix: prevent disabled items from being used in bom (#58997)
Co-authored-by: Ajish18 <ajishiyappan1@gmail.com>
(cherry picked from commit e6f431a8d6)
2026-09-12 21:58:25 +05:30
pandiyan
7df94d87de fix(stock): calculate batch bundle valuation per unit (#58994)
(cherry picked from commit 825d24f406)
2026-09-12 21:58:24 +05:30
mergify[bot]
f9433683ec fix: Backfill not_applicable on Item Tax Template Details for German companies (backport #54682) (backport #54686) (#58952)
* fix: Backfill `not_applicable` on Item Tax Template Details for German companies (backport #54682) (#54686)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
fix: Backfill `not_applicable` on Item Tax Template Details for German companies (#54682)
(cherry picked from commit a22d773341)

# Conflicts:
#	erpnext/patches.txt

* chore: resolve conflict

* fix: compare zero-rate row count, not just the identifier set

* chore: correct comment on account name uniqueness

* test: cover German `not_applicable` backfill patch

Run the patch against a company seeded from the shipped German defaults:
matching defaults are backfilled, customised templates and templates with a
duplicate account name are left alone, and a rerun changes nothing.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
2026-09-11 13:21:39 +02:00
mergify[bot]
62b9f31297 fix(accounts): add permission checks on invoice_discounting.get_invoices (backport #58975) (#58989)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-09-11 04:42:54 +00:00
mergify[bot]
85a152946e fix(accounts): add permission checks on execute_repost_payment_ledger (backport #58980) (#58981)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-09-11 09:38:50 +05:30
mergify[bot]
563615c77e fix(stock): recalculate billing status of returned delivery notes (backport #58953) (#58986)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2026-09-11 00:56:26 +02:00
Mihir Kandoi
52ea7ed606 fix(selling): exclude fully billed orders from the invoice picker (backport #58966) (#58968) 2026-09-10 20:51:03 +05:30
mergify[bot]
f59a6ec882 fix(stock): do not rebuild the Warehouse tree on an account map miss (backport #58956) (#58972)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-09-10 13:09:00 +00:00
Sudharsanan Ashok
bb0140ff3f Merge pull request #58946 from frappe/mergify/bp/version-15-hotfix/pr-58927
fix(manufacturing): handle empty raw materials in workstation (backport #58927)
2026-09-10 18:08:52 +05:30