Commit Graph

58628 Commits

Author SHA1 Message Date
Sudharsanan11
59bb56aa8d test: cover material transfer quantity precision 2026-07-31 14:41:53 +05:30
Sudharsanan11
eb969a5866 fix: respect quantity precision in material transfer validation 2026-07-31 14:41:53 +05:30
mergify[bot]
9b452f12b7 fix(accounts receivable): made territory field multi select (backport #57322) (#57346)
fix(accounts receivable): made territory field multi select (#57322)

(cherry picked from commit 1029cd988a)

Co-authored-by: Jatin3128 <140256508+Jatin3128@users.noreply.github.com>
2026-07-31 14:41:15 +05:30
mergify[bot]
c0ac8aaf86 fix(stock): value batched packed-item returns from the original bundle (backport #57327) (#57511)
fix(stock): value batched packed-item returns from the original bundle  (#57327)

* fix(stock): value batched packed-item returns from the original bundle

when a return delivery note or sales invoice bundle is built via the
use_serial_batch_fields / sle-driven path, its voucher_detail_no keeps the
packed item instead of being remapped to the parent dn/si item. the return
valuation lookup then misses and the bundle values at zero, so the sle
stock_value_difference stays wrong even after a repost.

resolve the original dn/si item via the packed item's parent_detail_docname
when the direct lookup fails, so the return values from the original outward
bundle on both submit and repost.

* test(stock): cover batched packed-item return valuation on repost

(cherry picked from commit d37e905322)

Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com>
2026-07-31 12:17:54 +05:30
mergify[bot]
0e46937f60 fix: filter Accounts Receivable by invoice sales partner (backport #57628) (#57648)
fix: filter Accounts Receivable by invoice sales partner (#57628)

Filter Accounts Receivable and AR Summary on the Sales Invoice's own
sales_partner instead of the customer's default_sales_partner, and read
the Sales Partner column from the invoice. Returns are attributed to the
invoice they settle, matching how the Sales Person filter works.

(cherry picked from commit fd7765ac02)

Co-authored-by: Jatin3128 <140256508+Jatin3128@users.noreply.github.com>
2026-07-31 12:06:36 +05:30
Shllokkk
0c0350110e Merge pull request #57557 from frappe/mergify/bp/version-16-hotfix/pr-57552
fix: respect child warehouse account override in Stock and Account Value Comparison (backport #57552)
2026-07-31 11:57:21 +05:30
Mihir Kandoi
a620648471 Merge pull request #57243 from frappe/mergify/bp/version-16-hotfix/pr-57223
fix(projects): include on hold status in project filters and reports (backport #57223)
2026-07-31 11:50:06 +05:30
Mihir Kandoi
5a75be871a Merge pull request #57638 from frappe/mergify/bp/version-16-hotfix/pr-57606
fix: guard scio row lookup in stock entry items_add (backport #57606)
2026-07-31 11:48:49 +05:30
Poovetha
3ba83134af fix(projects): add project filter
(cherry picked from commit 7248961568)
2026-07-31 11:07:35 +05:30
Poovetha
76fce556c8 test(projects): add test to ensure on hold project retains status
(cherry picked from commit 79e5ccd370)
2026-07-31 11:07:35 +05:30
Poovetha
d104d8e723 fix(projects): include on hold status in project filters and reports
(cherry picked from commit 51a9fc0316)
2026-07-31 11:07:35 +05:30
ruthra kumar
249acdd7e2 Merge pull request #57641 from frappe/mergify/bp/version-16-hotfix/pr-57434
fix: update doc status in period closing voucher (backport #57434)
2026-07-31 10:48:14 +05:30
nareshkannasln
17aeb0b55b fix: validate account frozen date
(cherry picked from commit b3c2ba5381)
2026-07-31 05:05:52 +00:00
mergify[bot]
2d03d80269 feat: status based bar colors in Work Order gantt view (backport #57634) (#57636)
feat: status based bar colors in Work Order gantt view (#57634)

(cherry picked from commit d59c5e36bc)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-07-31 09:58:54 +05:30
pandiyan
fb6c87dd0c fix: guard scio row lookup in stock entry items_add
check the result of find() before reading t_warehouse off it. on a
'receive from customer' entry with no row carrying scio_detail, find()
returns undefined and items_add throws a typeerror.

the throw rejects the serially-run handler chain, so the stock entry
controller's own items_add never runs and the new row silently loses
its target warehouse, expense account, cost center and serial/batch
field defaults.

leave t_warehouse unset when no reference row exists, so the rest of
the chain still runs.

(cherry picked from commit 6e444a1832)
2026-07-31 03:26:57 +00:00
mergify[bot]
34cbd3c8d5 fix: do not fetch a random inventory account when multiple inventory accounts exist (backport #57626) (#57632)
* fix: do not fetch a random inventory account when multiple inventory accounts exist (#57626)

(cherry picked from commit 386a4ac1f0)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py

* chore: fix conflicts

Remove redundant inter-company transaction tests and related setup.

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-07-30 23:25:18 +05:30
Mihir Kandoi
9c86f98e5f Merge pull request #57630 from frappe/mergify/bp/version-16-hotfix/pr-57616
fix: seed standard Item Groups under the existing tree root (backport #57616)
2026-07-30 19:39:13 +05:30
Mihir Kandoi
d1d214ddee chore: fix import order in item group tests 2026-07-30 19:18:07 +05:30
Mihir Kandoi
4ffa950aa3 fix: seed standard Item Groups under the existing tree root
install_fixtures always inserted "All Item Groups" as a parentless group.
On a site where another app had already created the root, ItemGroup.validate
re-parented it, leaving a second group-root that held the standard groups
while the real root held everything else.

This is reproducible with the healthcare app on a non-English site: its
after_install seeds the root as _("All Item Groups"), so a pt-BR site gets
"Todos os Grupos de Itens" as the root before the setup wizard runs. The
split predates #57390 -- the old translated-name lookup resolved to the same
root and produced an identical tree.

Resolve the root once with get_root_of (falling back to the canonical English
name on fresh installs) and use it for the root record's exists-guard and the
standard groups' parent, matching Company.create_default_departments.

Patch merges an already-seeded "All Item Groups" into the root it sits under,
lifting its children and repointing every link.

Closes #57581

(cherry picked from commit e7088d8981)
2026-07-30 13:42:04 +00:00
Shllokkk
43fd439866 Merge pull request #57620 from frappe/mergify/bp/version-16-hotfix/pr-57618
fix: source manually created asset value from valuation rate (backport #57618)
2026-07-30 15:21:11 +05:30
Shllokkk
aa60192ab7 refactor: add type-hints for get_values_from_purchase_doc in asset 2026-07-30 15:03:04 +05:30
Shllokkk
b556b012f0 fix: source manually created asset value from valuation rate
(cherry picked from commit 46e01c2d92)
2026-07-30 09:23:30 +00:00
mergify[bot]
49924ddd1d fix(stock): keep manufactured item rate at zero when inputs are free (backport #57334) (#57513)
fix(stock): keep manufactured item rate at zero when inputs are free  (#57334)

* fix(stock): keep manufactured item rate at zero when inputs are free

when a finished item is produced from raw materials consumed at zero
valuation, the incoming rate fell back to the item's own valuation
rate (or BOM cost), valuing free inputs as output and inflating the fg
value on every production run.

add has_consumption_basis() to detect when the consumed cost is known
even if it is zero (consumed rows present, or a consumption entry
exists for the work order). when it is, skip the get_valuation_rate and
BOM-cost fallbacks so a real cost of zero is preserved.

* test(stock): cover manufacture rate for zero-valued raw materials

- manufacture from a free input keeps fg basic_rate and sle
  incoming_rate/stock_value_difference at zero even when the fg already
  carries a valuation in the target warehouse
- material consumption on with no consumption entry does not fall back
  to bom/price-list rate for free inputs
- zero-valued consumption entry keeps the manufacture entry's fg rate
  at zero

(cherry picked from commit 73224d3650)

Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com>
2026-07-30 09:25:35 +05:30
mergify[bot]
1ea1ce15d0 fix(accounts): update AU standard chart of accounts (backport #57145) (#57608)
fix(accounts): update AU standard chart of accounts (#57145)


(cherry picked from commit fee3a6e0fd)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
Co-authored-by: Jebajebas <jeba.j@arus.co.in>
2026-07-30 02:32:38 +00:00
Mihir Kandoi
04e1ca8226 fix(selling): don't require cancel and delete perms to remove items via Update Items (backport #57419) (#57601)
Row removal called cancel() and delete() on the child row, and both check
permissions against the parent doctype. Dropping a row therefore needed Cancel
and Delete on the order, while the rest of the dialog only needs Write: the
button is gated on has_perm("write"), update_child_qty_rate checks parent
Write, and edits save with ignore_permissions=True.

Set ignore_permissions on the row before cancel/delete so removal sits behind
the same parent Write check as add and edit. validate_child_on_delete is
unchanged, so rows with ordered, received, delivered or billed qty are still
refused.

On version-16-hotfix validate_and_delete_children still lives in
erpnext/controllers/accounts_controller.py, not the extracted
erpnext/accounts/services/child_item_update.py module it was moved to on
develop.

Co-authored-by: Kaushal Shriwas <64089478+kaulith@users.noreply.github.com>
2026-07-29 11:30:36 +00:00
mergify[bot]
16be0f0944 fix: let Purchase Receipt cancel defer to Frappe's linked-document check (backport #57592) (#57597)
fix: let Purchase Receipt cancel defer to Frappe's linked-document check (#57592)

on_cancel pre-blocked cancellation with its own "Purchase Invoice is
already submitted" guard, duplicating the check Frappe already runs for any
submitted linked document. Drop the guard and the unused check_next_docstatus()
method it mirrored so the receipt defers to the framework: the Cancel All
Documents flow cancels the invoice first and then the receipt, and a direct
cancel is still rejected by Frappe's linked-document check.

Add a regression test that a direct cancel of a receipt with a submitted
invoice is rejected and rolls back, leaving no stray stock or GL entries.

(cherry picked from commit cfe18e8427)

# Conflicts:
#	erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
#	erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py

Co-authored-by: Jatin3128 <140256508+Jatin3128@users.noreply.github.com>
2026-07-29 15:24:08 +05:30
Krishna Pramod Shirsath
7daa1dacc3 Merge pull request #57590 from frappe/mergify/bp/version-16-hotfix/pr-57314
fix(italy): skip e-invoicing for opening invoices (backport #57314)
2026-07-29 13:43:52 +05:30
mergify[bot]
87735b1f68 refactor(accounts): repost accounting ledger (backport #56442) (#57585)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-07-29 13:06:18 +05:30
Krishna Shirsath
5e584d1cfb fix(italy): skip e-invoicing for opening invoices
(cherry picked from commit f328018bfb)
2026-07-29 05:39:39 +00:00
Mihir Kandoi
123e205bbd Merge pull request #57559 from aerele/backport-57335-version-16-hotfix
refactor: reuse shared date range validation across reports
2026-07-29 07:54:46 +05:30
Shllokkk
52f61c088e Merge pull request #57568 from frappe/mergify/bp/version-16-hotfix/pr-57566
fix(item): correct description on deferred revenue/expense (backport #57566)
2026-07-28 23:21:22 +05:30
mergify[bot]
9c946eb168 fix: recover failed POS closings (backport #57203) (#57572)
Co-authored-by: Krishna Pramod Shirsath <91021227+krishna-254@users.noreply.github.com>
Co-authored-by: diptanilsaha <diptanil@frappe.io>
2026-07-28 22:58:24 +05:30
Mihir Kandoi
8f36753705 fix(manufacturing): fall back to UOM Conversion Factor in Production Plan (backport #57553) (#57554)
fix(manufacturing): fall back to UOM Conversion Factor in Production Plan

Production Plan read the conversion factor straight off the item's own
UOM child table, so an item with a purchase UOM but no matching row threw
"UOM Conversion factor not found" while Stock Entry silently resolved it
from the item's variant template or the UOM Conversion Factor doctype.
Resolve it the same way, and keep returning None when nothing is
configured anywhere so the missing-setup error still fires.
2026-07-28 15:02:05 +00:00
mergify[bot]
7a606ab91c fix: add permission check for get_item_details (backport #57515) (#57551)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-07-28 14:47:51 +00:00
Shllokkk
2471c5ccbb fix: bump item doctype modified timestamp so description change syncs on migrate 2026-07-28 19:40:10 +05:30
Shllokkk
0ce50407f9 fix: resolve backport conflicts in item doctype 2026-07-28 19:33:33 +05:30
Shllokkk
ee12f8d2d4 fix(item): correct description on deferred revenue/expense
(cherry picked from commit fa75aa08ab)

# Conflicts:
#	erpnext/stock/doctype/item/item.json
#	erpnext/stock/doctype/item/item.py
2026-07-28 13:52:59 +00:00
Khushi Rawat
c690ed0058 Merge pull request #57429 from frappe/mergify/bp/version-16-hotfix/pr-57382
fix: map MT940 per-transaction reference from :61: customer_reference (backport #57382)
2026-07-28 18:00:14 +05:30
pandiyan
b432a10222 refactor: reuse shared date range validation across reports 2026-07-28 17:29:40 +05:30
Shllokkk
ca657d2629 fix: respect child warehouse account override in Stock and Account Value Comparison (#57552)
fix: respect child warehouse account override in stock vs account value comparison
(cherry picked from commit 5fc20d6b8e)
2026-07-28 11:22:41 +00:00
Mihir Kandoi
083ef9baa7 Merge pull request #57542 from frappe/mergify/bp/version-16-hotfix/pr-57540
fix(setup): scope manufacturing warehouse filters to company (backport #57540)
2026-07-28 14:22:17 +05:30
Mihir Kandoi
f05e8ed0ce fix(setup): scope manufacturing warehouse filters to company
Default WIP, Finished Goods and Scrap Warehouse fields on Company listed
warehouses of every company. Filter them by the current company and
exclude group warehouses, matching the other warehouse fields.

(cherry picked from commit 632113c309)

# Conflicts:
#	erpnext/setup/doctype/company/company.js
2026-07-28 14:20:05 +05:30
Mihir Kandoi
feec193d7d Merge pull request #57536 from mihir-kandoi/backport-bom-creator-update-cost-v16
fix(manufacturing): update cost of BOMs created via BOM Creator (backport #57532)
2026-07-28 13:06:27 +05:30
rohitwaghchaure
861c50e727 fix: skip stock expense GL entries for non-stock items (#57518)
* fix: skip stock expense gl entries for non stock items

(cherry picked from commit 747f4df778dca45cf044c02f0e933d3b230b8334)

* test: use a leaf expense account for the service item invoice
2026-07-28 13:00:41 +05:30
Mihir Kandoi
f1a0a5e1bf fix(manufacturing): update cost of BOMs created via BOM Creator
`calculate_rm_cost` skipped rate refresh whenever `bom_creator` was set,
so neither the Update Cost button nor the BOM Update Tool could ever
refresh those BOMs. Every BOM in a multi-level tree carries the field, so
whole trees stayed frozen at their creation rates.

The guard replaced the removed `rm_cost_as_per == "Manual"` check in
0b63dbf, on the assumption that BOM Creator rows hold manual rates. They
do not: BOM Creator recomputes every row from `rm_cost_as_per` on save.
2026-07-28 12:49:21 +05:30
Mihir Kandoi
7eb0eb77aa Merge pull request #57529 from frappe/mergify/bp/version-16-hotfix/pr-57521
fix(manufacturing): sum semi-FG qty across split job cards (backport #57521)
2026-07-28 12:47:43 +05:30
Mihir Kandoi
ca15a14666 test: import make_job_card from work_order module on v16 2026-07-28 12:34:50 +05:30
Mihir Kandoi
afbe1f7e53 Merge pull request #57530 from frappe/mergify/bp/version-16-hotfix/pr-57528
fix(manufacturing): scope BOM Creator tree children to the parent row (backport #57528)
2026-07-28 12:30:24 +05:30
Mihir Kandoi
339bb0b4ea fix(manufacturing): scope BOM Creator tree children to the parent row
The BOM Creator tree identified a node by the parent's item code
(fg_item) instead of the specific BOM Creator Item row, so every
occurrence of a repeated sub-assembly shared one child set: expanding
any one of them listed the raw materials of all of them, and deleting
one wiped the raw materials of its siblings.

Key the tree on fg_reference_id and make the node value the row name,
matching the framework convention that a tree node's value is its
docname. Item code now travels as its own field for the label and for
the fg_item argument sent back on add/convert.

Fixes #57311

(cherry picked from commit b37152752f)
2026-07-28 06:49:59 +00:00
Diptanil Saha
fe6534b888 refactor(postgres): port point_of_sale get_items to the query builder (partial backport #56153) (#57527)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 12:17:20 +05:30