Commit Graph

55497 Commits

Author SHA1 Message Date
Mohd Haris
de0c75bcba fix: update BOM operations when routing is changed
The routing field handler only fetched operations from the routing when
the operations table was empty. When a new BOM version is created (via
"New Version"), operations are copied from the source BOM, so selecting a
different routing left the old operations in place - both in the form and
after saving.

Drop the `!frm.doc.operations.length` guard from the routing handler so
that (re)selecting a routing always refetches the operations from that
routing via the existing get_routing method, which clears and repopulates
the operations table.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 758a837de4)
2026-07-09 15:11:43 +00:00
Mihir Kandoi
7f4c68c1da Merge pull request #56924 from frappe/revert-56429-mergify/bp/version-15-hotfix/pr-55191
Revert "refactor(sales_person_wise_transaction_summary): Replace SQL with que… (backport #55191)"
2026-07-09 20:38:24 +05:30
mergify[bot]
55e0d106c9 fix: added permission checks on various whitelisted functions (backport #56745) (#56945)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-07-09 16:00:19 +05:30
Diptanil Saha
2ed6f25d94 Merge pull request #56968 from frappe/mergify/bp/version-15-hotfix/pr-56674
fix(crm_settings): skip allowed users check when frappe crm is installed locally (backport #56674)
2026-07-09 15:51:58 +05:30
diptanilsaha
0924773856 chore: patch to clear out allowed users on crm_settings if frappe crm is installed on the site
(cherry picked from commit 0f987d7135)
2026-07-09 10:01:55 +00:00
diptanilsaha
983ec5660c fix(frappe_crm_api): handle failure for after_app_install and after_app_uninstall
(cherry picked from commit 2de423e225)
2026-07-09 10:01:54 +00:00
diptanilsaha
0a5daeed57 feat(crm_settings): auto-update crm sync settings on frappe crm install and uninstall
(cherry picked from commit c86aa2d6fe)
2026-07-09 10:01:54 +00:00
diptanilsaha
95b3bd4e1d fix(crm_settings): skip allowed users check when frappe crm is installed locally
(cherry picked from commit 41badb3d74)
2026-07-09 10:01:53 +00:00
Diptanil Saha
d0f29405d0 fix(patch): moved create_company_custom_fields from pre_model_sync to post_model_sync (#56962) 2026-07-09 08:13:08 +00:00
Shllokkk
8b4bc37a32 Merge pull request #56939 from frappe/mergify/bp/version-15-hotfix/pr-56926
fix: validate template and its variant in the same Pricing Rule (backport #56926)
2026-07-09 01:04:02 +05:30
mergify[bot]
51669501ab feat(sla): filter service level agreement link by document type (backport #56954) (#56955)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2026-07-08 17:29:42 +02:00
ruthra kumar
1239986756 Merge pull request #56937 from frappe/mergify/bp/version-15-hotfix/pr-54043
fix: precision issue causing reconciliation error (backport #54043)
2026-07-07 22:24:48 +05:30
Shllokkk
3df52c7fc6 fix: validate template and its variant in the same Pricing Rule
(cherry picked from commit a88048b378)
2026-07-07 14:29:54 +00:00
Dany Robert
d62831d885 fix: precision issue causing reconciliation error (#54043)
* fix: precision issue causing reconciliation error

* chore: code styling changes

* test: precision causing reconciliation failure

* fix: enhance payment reconciliation tests for floating-point precision

* fix(test): incorrect assertion on status

---------

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
(cherry picked from commit be10c8ced9)
2026-07-07 14:28:57 +00:00
Vishnu Priya Baskaran
1fe9d569d6 Revert "refactor(sales_person_wise_transaction_summary): Replace SQL with que… (backport #55191)" 2026-07-07 12:21:12 +05:30
Shllokkk
6165d2fa94 Merge pull request #56096 from frappe/mergify/bp/version-15-hotfix/pr-56088
fix(journal entry): validate opening entry against pcv on save (backport #56088)
2026-07-06 15:24:17 +05:30
ruthra kumar
ec1ca6ba95 Merge pull request #56875 from frappe/mergify/bp/version-15-hotfix/pr-56852
fix: race condition in process pcv (backport #56852)
2026-07-04 16:44:37 +05:30
ruthra kumar
dcea09ea8f chore: linter fix
(cherry picked from commit a9ffdac806)
2026-07-04 16:26:19 +05:30
ruthra kumar
6945e1292b refactor: prevent whole table scan while scheduling next date
- helps in concurrency isolation

(cherry picked from commit 21f4603144)
2026-07-04 16:26:10 +05:30
ruthra kumar
1ee8904a94 fix: prevent repeatable read related concurrency errors
Process Period Closing Voucher and Process Period Closing Voucher
Details are trackers how the jobs are processed. Keep transactions on
them very short.

(cherry picked from commit 7e4045e828)
2026-07-04 10:53:02 +00:00
ruthra kumar
ae43f47c39 fix: race condition and repeatable read in process pcv
- Update using child table name to avoid scanning whole table, which
eventually leads to mariadb 1020 (REPEATABLE READ).
 - Avoid race condition in final summarization

(cherry picked from commit ff6881764b)
2026-07-04 10:53:02 +00:00
Pandiyan P
75a814de36 Merge pull request #56862 from frappe/mergify/bp/version-15-hotfix/pr-56837
fix: remove company default on cost center in stock entry detail  (backport #56837)
2026-07-04 13:10:47 +05:30
pandiyan
5cedc50c55 fix: use change_settings decorator matching version-15-hotfix test utils
ERPNextTestSuite doesn't exist on this branch; the cherry-picked test
used the develop-branch decorator style, breaking ruff (F821) in CI.
2026-07-04 12:53:57 +05:30
Pandiyan P
da623eb124 fix: resolve conflicts 2026-07-04 12:45:09 +05:30
Shllokkk
ece1c9872f fix: use live source warehouse valuation for internal transfer purchse receipts (#56812)
fix: use live source warehouse valuation for internal transfer purchase receipts
2026-07-03 22:49:33 +05:30
Mihir Kandoi
47121cecb3 Merge pull request #56838 from frappe/mergify/bp/version-15-hotfix/pr-56826
fix: FIFO queue checks and incorrect entries filter in stock ledger reports (backport #56826)
2026-07-03 21:59:18 +05:30
Mihir Kandoi
93f33cc5cf test: fresh item per test, v15 only rolls back at class teardown 2026-07-03 21:42:58 +05:30
Mihir Kandoi
0ab94a929a chore: formatting 2026-07-03 21:20:32 +05:30
Mihir Kandoi
cecfcf82e0 fix: incorrect import path for FrappeTestCase 2026-07-03 21:14:43 +05:30
pandiyan
1a52c58666 test: cover cost center fallback to item group default in manufacture entry
the existing test_cost_center_for_manufacture only checks a raw material
row against an item-level override, which is set independently of the
":company" default guard and never exercised the bug.

(cherry picked from commit a168bb7ea4)
2026-07-03 15:42:58 +00:00
pandiyan
b170913880 fix: remove company default on cost center in stock entry detail
the ":company" default pre-filled every row before set_default_cost_center()
ran, so its "if not row.cost_center" guard was always false and the
project/item group/brand priority chain in get_default_cost_center()
never ran.

(cherry picked from commit edfa0a7a1d)

# Conflicts:
#	erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
2026-07-03 15:42:58 +00:00
Khushi Rawat
3e6a5b3a0b Merge pull request #56797 from Jatin3128/fix/asset-expense-account-purchase-receipt
fix: fetch asset category expense account on purchase receipt
2026-07-03 17:31:26 +05:30
Mihir Kandoi
db4136b258 fix: use correct import 2026-07-03 13:54:07 +05:30
Mihir Kandoi
f3dd90bb0a test: drop redundant cleanup, db rolls back after each test
(cherry picked from commit 3b1e57966e)
2026-07-03 07:50:02 +00:00
Mihir Kandoi
3c47adb021 fix: address review comments
- restore mutated SLE after test via addCleanup
- explicit return False in has_difference
- comment the fifo_stock_diff guard for non-queue predecessors

(cherry picked from commit ef5f47fafd)
2026-07-03 07:50:02 +00:00
Mihir Kandoi
19fc8b8e6f fix: FIFO queue checks and incorrect entries filter in stock ledger reports
- 'Show Incorrect Entries' always returned an empty result (regression
  from #43619); now returns entries from one row before the first
  incorrect one
- FIFO queue columns were computed for serialized/batched SLEs that
  don't maintain a stock queue, showing false differences; left empty
  for such rows
- compare value/valuation differences at currency precision, qty at
  float precision

(cherry picked from commit 94ab09e4a3)

# Conflicts:
#	erpnext/stock/report/stock_ledger_invariant_check/test_stock_ledger_invariant_check.py
2026-07-03 07:50:01 +00:00
mergify[bot]
1cf94f5501 fix: replay immutable SLE qty for serial/batch bundle valuation (backport #56814) (#56834)
fix: replay immutable SLE qty for serial/batch bundle valuation (#56814)

(cherry picked from commit ecc8ec672b)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-07-03 12:37:11 +05:30
mergify[bot]
b0446b6a09 fix: don't attempt to create SABB for non-serialized / non-batch items (backport #56627) (#56802)
* fix: don't attempt to create SABB for non-serialized / non-batch items (#56627)

* fix: don't attempt to create SABB for non-serialized / non-batch items

* fix(stock): skip serial batch lookup for rows without item code

(cherry picked from commit 5b738b7b0d)

# Conflicts:
#	erpnext/stock/services/serial_batch_bundle_service.py

* chore: resolve conflicts

---------

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2026-07-03 10:35:17 +05:30
mergify[bot]
5666fd1334 fix(company): ignore user permissions for link fields having link to Account and Cost Center (backport #56748) (#56794)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-07-02 13:02:09 +00:00
jatin3128
b7e0331d56 fix: fetch asset category expense account on purchase receipt
Backport of #41024. Fixed-asset items now resolve expense_account from
the asset category (CWIP account when CWIP accounting is enabled,
otherwise the fixed asset account) for Purchase Receipt, Purchase Order
and Material Request, matching v16 behavior. v15 previously did this only
for Purchase Invoice.
2026-07-02 16:38:02 +05:30
ruthra kumar
16b90ab20f Merge pull request #56776 from frappe/mergify/bp/version-15-hotfix/pr-54783
fix: disallow editing on reversal journals (backport #54783)
2026-07-02 14:57:21 +05:30
mergify[bot]
44a7013ab4 fix: block serialized to non-serialized item change when SABB exists (backport #56773) (#56774)
* fix: block serialized to non-serialized item change when SABB exists (#56773)

(cherry picked from commit 0e8ae7548d)

# Conflicts:
#	erpnext/stock/doctype/item/item.py
#	erpnext/stock/doctype/item/test_item.py

* chore: fix conflicts

* chore: fix conflicts

Remove test for variant UOM mismatch and related logic.

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-07-02 09:26:04 +00:00
ruthra kumar
ac2e69fbfd fix: disallow editing on reversal journals
(cherry picked from commit 26ca7445eb)
2026-07-02 09:07:45 +00:00
Nabin Hait
080b8d5183 Merge pull request #56768 from frappe/backport/clear-clearance-date-amend-v15
fix(accounts): clear clearance date when amending reconciled voucher (backport #55947)
2026-07-02 13:31:07 +05:30
Mihir Kandoi
7f2fb78d94 Merge pull request #56763 from frappe/mergify/bp/version-15-hotfix/pr-56757
fix: don't treat batch slot at FIFO queue head as qty slot (backport #56757)
2026-07-02 13:19:20 +05:30
Nabin Hait
5f14f2ccd6 fix(accounts): clear clearance date when amending reconciled voucher (backport #55947)
When a reconciled voucher (Payment Entry / Journal Entry / Purchase
Invoice / Sales Invoice) is cancelled, amended and resubmitted, the
stale clearance date was carried into the amended draft because the
framework ignores `no_copy` while amending.

Add a shared `before_insert` hook on AccountsController that clears
`clearance_date` (top-level field and Sales Invoice `payments` rows)
on amendment. Reconciliation still sets the value post-submit via
`frappe.db.set_value`, which bypasses this path.

Manual backport of #55947 to version-15-hotfix (Mergify's auto-backport
#55972 committed conflict markers; this replaces it).
2026-07-02 12:54:27 +05:30
Mihir Kandoi
4a6587b48e test: assert full negative batch slot in ageing regression test
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 8928b42d5d)
2026-07-02 07:14:14 +00:00
Mihir Kandoi
a9330e8900 fix: don't treat batch slot at FIFO queue head as qty slot
An incoming SLE without resolvable serial/batch details hit the
negative-head branch in _compute_incoming_stock even when the head was
a batch slot, because flt() on the batch number string returns 0.0.
_add_to_negative_fifo_head then crashed with
"TypeError: can only concatenate str (not 'float') to str".

Guard the branch with is_qty_slot, mirroring the existing check in
_add_transfer_slot_to_fifo_queue.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit c47a95a4d2)
2026-07-02 07:14:14 +00:00
mergify[bot]
71a2d6e43d fix: validate reverse GL entries on current date under immutable ledger (backport #56709) (#56751)
* fix: validate reverse GL entries on current date under immutable ledger (#56709)

* fix: validate reverse GL entries on current date under immutable ledger

When Immutable Ledger is enabled, the reverse GL entry is posted on the
current date, but the closed-period checks in make_reverse_gl_entries still
validate against the original (backdated) posting date. This blocks cancelling
a backdated voucher, such as a suspense Journal Entry for a migrated NPA loan,
with a books-closed error even though the reverse entry lands in an open period.

Validate both check_freezing_date and validate_against_pcv against the current
date when Immutable Ledger is enabled. When it is disabled, behaviour is
unchanged.

Follow-up to #55268.

* test: reset frozen till date after reverse entry test

The freeze date set on the company was not reset, so it leaked into the next
test which posts entries in that period. Reset it in a finally block.

* fix: prefer explicit posting_date under immutable ledger

Prefer the posting_date argument before frappe.form_dict and getdate, at both
the validation and the GL entry site, so an explicit date passed by the caller
is honoured and validation still matches the posted date.

(cherry picked from commit cab1b129c0)

# Conflicts:
#	erpnext/accounts/general_ledger.py

* fix: resolved conflicts

Removed outdated check for freezing date in general ledger validation.

* fix: Update check_freezing_date function call parameters

* fix: accounts_frozen_till_date to acc_frozen_upto

* test: acc_frozen_upto setting in test_period_closing_voucher

---------

Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
2026-07-02 12:27:20 +05:30
ruthra kumar
a0b527d019 refactor: update title for process statement of accounts (backport #56754) (#56755)
refactor: update title for process statement of accounts

(cherry picked from commit 04468c3c33)

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
2026-07-02 12:17:01 +05:30