Commit Graph

55518 Commits

Author SHA1 Message Date
Mihir Kandoi
f14615e826 Merge pull request #57027 from aerele/backport-56913-version-15-hotfix
fix: make trend report based-on and group-by column labels translatable
2026-07-10 12:44:09 +05:30
Mihir Kandoi
12b826484b Merge pull request #57021 from aerele/backport-56923-version-15-hotfix
perf: avoid per-row Warehouse doc fetches in auto reorder job
2026-07-10 12:44:02 +05:30
Mihir Kandoi
9c0ea9ffbb Merge pull request #57019 from aerele/backport-56932-version-15-hotfix
fix: validate planned end date is not before planned start date in wo…
2026-07-10 12:43:01 +05:30
pandiyan
d2d5fae033 fix: make trend report based-on and group-by column labels translatable
based_wise_columns_query() and group_wise_column() built column labels as
raw strings, so headers like Item, Item Name, Customer, Supplier, and
Territory never went through the _() translation function and stayed in
English regardless of the user's language, while period and total columns
translated fine. Build these as column dicts with an explicit _()-wrapped
label instead, so they're translated the same way as the rest of the report.

(cherry picked from commit 015fa68fc0)
2026-07-10 12:01:56 +05:30
Pandiyan P
4091188908 fix(stock): pick list serial batch posting date (#56957) (#57014)
Pick List has no posting_date/posting_time fields, so creating or updating a
Serial and Batch Bundle from a Pick List row crashed with
"TypeError: combine() argument 1 must be datetime.date, not None". Fall back
to today/now when the parent voucher doesn't carry its own posting date.

Fixes #56951

The whitelisted add_serial_batch_ledgers only converted child_row into an
attribute-accessible frappe._dict when it arrived as a JSON string, and doc's
type hint only allowed Document | str. Frappe's JSON API delivers both as
plain dicts (see frappe.app.make_form_dict, which parses the request body
with orjson and only wraps the top-level dict, not nested values), so every
real request was rejected before the handler body ever ran: first with a
FrappeTypeError on doc, and once that's fixed, with an AttributeError on
child_row.serial_and_batch_bundle. parse_json already wraps a plain dict in
frappe._dict (and leaves a real Document instance untouched), so routing
child_row through it unconditionally fixes both.

(cherry picked from commit 8b3caeb578)
2026-07-10 11:51:03 +05:30
mergify[bot]
6b022a5a7e fix: for purchases do voucher based reposting (backport #56601) (#56607)
* fix: for purchases do voucher based reposting (#56601)

(cherry picked from commit 5523c15ab8)

* chore: fix type hints

* chore: fix test case

* chore: fix linters issue

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-07-10 06:20:32 +00:00
pandiyan
c10b86d538 perf: avoid per-row Warehouse doc fetches in auto reorder job
get_item_warehouse_projected_qty() called frappe.get_doc("Warehouse", ...)
inside the per-bin loop to walk up the warehouse hierarchy, re-fetching the
same parent warehouses over and over on sites with nested warehouses. Preload
the warehouse-to-parent mapping with a single query and walk it in-memory
instead, cutting the DB round-trips from O(bins * hierarchy depth) to one
query.

(cherry picked from commit 6beb3d2509)
2026-07-10 11:41:43 +05:30
pandiyan
de6a157773 fix: validate planned end date is not before planned start date in work order
Work Order allowed saving with a Planned End Date earlier than the Planned
Start Date without any validation. Add a validate_dates check that throws
when the planned end date precedes the planned start date.

(cherry picked from commit 2ec780cb35)
2026-07-10 11:36:05 +05:30
Mihir Kandoi
8bfba5fcf3 Merge pull request #57003 from aerele/backport-57001
fix(manufacturing): update work order status on partial pick-list tra…
2026-07-09 21:57:38 +05:30
rohitwaghchaure
53af4d53ef fix: partial delivery note against pick list (#56985) 2026-07-09 16:17:10 +00:00
pandiyan
afa72884bb fix(manufacturing): update work order status on partial pick-list transfer (backport #56800)
Backport of frappe/erpnext#56800 (via #56836/#57001). When a Pick List
transfers only some of the required raw materials, the min-fraction
rule keeps material_transferred_for_manufacturing at 0, leaving the
Work Order stuck at "Not Started" even though material is already in
WIP. Treat any submitted pick-list-linked Material Transfer stock
entry as evidence the order has started.
2026-07-09 21:33:01 +05:30
Mihir Kandoi
cb65b55568 Merge pull request #56987 from frappe/mergify/bp/version-15-hotfix/pr-56909
fix(stock): rename variant item_code/item_name when attribute abbreviation changes (backport #56909)
2026-07-09 21:23:40 +05:30
Mihir Kandoi
62ce6c2129 Merge pull request #56993 from frappe/mergify/bp/version-15-hotfix/pr-56925
perf: batch bin lookups in delivery note stock update (backport #56925)
2026-07-09 21:22:59 +05:30
Mihir Kandoi
6484f0de54 Merge pull request #56999 from frappe/mergify/bp/version-15-hotfix/pr-56255
Fix Variant Of filter to show only template items (backport #56255)
2026-07-09 21:11:59 +05:30
Mihir Kandoi
1824c59624 Merge pull request #56997 from frappe/mergify/bp/version-15-hotfix/pr-56979
fix: update BOM operations when routing is changed (backport #56979)
2026-07-09 20:48:41 +05:30
Mihir Kandoi
cef69b05a9 chore: resolve conflicts 2026-07-09 20:44:57 +05:30
Mohsin Akhtar
902a3c5c55 fix: update modified timestamp in item.json
(cherry picked from commit 54da9fc27a)

# Conflicts:
#	erpnext/stock/doctype/item/item.json
2026-07-09 15:12:41 +00:00
Mohsin Akhtar
fde7cd5345 fix: show only template items in Variant Of filter
(cherry picked from commit 2433129850)
2026-07-09 15:12:39 +00:00
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
pandiyan
989a6b507d perf: batch bin lookups in delivery note stock update
update_current_stock() in delivery_note.py used to call
frappe.db.get_value("Bin", ...) separately for every row in items and
every row in packed_items - so a delivery note with 200 items and 200
packed items made 400 separate database calls on every save.

now it groups item codes by warehouse and fetches bin data with one
query per distinct warehouse, then assigns actual_qty/projected_qty to
each row from that result - same values as before, far fewer database
calls, and no cross-product over-fetch across warehouses.

(cherry picked from commit 5da878d25f)
2026-07-09 15:06:35 +00:00
pandiyan
f119080eb3 test: cover variant item_code/item_name rename on abbreviation change
Add regression coverage for the new abbreviation-rename propagation:
a simple item_code rename, item_name derived from a template whose
item_name differs from its item_code, and a manually customized
item_name getting rebuilt rather than left stale.

(cherry picked from commit e718a70b26)
2026-07-09 15:03:29 +00:00
pandiyan
99bdef6baf fix: rename variant item_code/item_name when attribute abbreviation changes
Item Attribute abbreviations only got baked into a variant's item_code
and item_name at creation time (make_variant_item_code returns early
once item_code is set). Renaming an abbreviation afterwards left every
existing variant stuck with the stale code, silently out of sync with
its own attribute.

Detect abbreviation renames on Item Attribute save, find every variant
using the affected value, and rebuild+rename its item_code via
frappe.rename_doc so linked records follow along. item_name is rebuilt
in lockstep from the template's item_name, even if it had since been
customized, since both fields are meant to be derived from the same
abbreviation.

(cherry picked from commit c0cfe5f363)
2026-07-09 15:03:28 +00:00
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