Commit Graph

55923 Commits

Author SHA1 Message Date
Pandiyan P
6ea68a602b fix(selling): check sales order permission before work order creation (#58492)
(cherry picked from commit a8ba713f80)

# Conflicts:
#	erpnext/selling/doctype/sales_order/mapper.py
2026-08-27 12:06:03 +00:00
Sudharsanan Ashok
b00062df86 fix(stock): reset bin when a repost finds no stock ledger entries (#58434)
* fix(stock): reset bin when a repost finds no stock ledger entries

`build()` wipes `prev_sle_dict` in `initialize_reposting()` before `update_bin()`
runs, so a repost over an item and warehouse whose ledger is empty writes no bin
at all. `actual_qty`, `stock_value` and `valuation_rate` keep their last values,
bin totals drift from the stock balance, and reposting again cannot heal it.

Reset those bins as a terminal step in `update_bin()`, guarded by a re-check that
no live SLE exists so ordinary valuation is untouched.

Cancel is already correct on this branch, since `initialize_previous_data()` seeds
zeros when there is no previous SLE and the sle_id path never calls
`initialize_reposting()`. That seeding stays; this is a repost-path fix only.
develop drops it in #58362 because the `cancelled` guard makes it dead code there.

* test(stock): cover bin reset when the stock ledger is empty
2026-08-27 16:23:10 +05:30
Sudharsanan Ashok
2ce0bb1009 Merge pull request #58474 from frappe/mergify/bp/version-15-hotfix/pr-58469
fix: clarify duplicate internal party messages (backport #58469)
2026-08-27 16:13:40 +05:30
Sudharsanan Ashok
25ec044c09 Merge pull request #58428 from frappe/mergify/bp/version-15-hotfix/pr-58402
feat(analytics): filter sales and purchase analytics by entity  (backport #58402)
2026-08-27 16:12:13 +05:30
mergify[bot]
d62f6e715f fix: mark item tax templates as not applicable (backport #54673) (backport #54677) (#58462)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2026-08-27 09:46:30 +00:00
Pandiyan P
045d7086d1 fix(accounts): validate frozen accounts in period closing voucher (#58477) 2026-08-27 08:46:01 +00:00
Shllokkk
6f95c1ff92 Merge pull request #58473 from frappe/mergify/bp/version-15-hotfix/pr-58470
fix: validate items against source Sales Order in Material Request (backport #58470)
2026-08-27 14:04:44 +05:30
pandiyan
17208e7434 fix: clarify duplicate internal party messages (#58469)
(cherry picked from commit 4d4cf034b5)

# Conflicts:
#	erpnext/selling/doctype/customer/customer.py
2026-08-27 13:53:43 +05:30
Shllokkk
59a9819dae test: block item change on Sales Order-sourced Material Request row
(cherry picked from commit 07f8250e40)

# Conflicts:
#	erpnext/stock/doctype/material_request/test_material_request.py
2026-08-27 13:17:29 +05:30
Shllokkk
32d44c6e91 fix: validate items against source Sales Order in Material Request
(cherry picked from commit 65466464df)
2026-08-27 07:36:46 +00:00
Sudharsanan11
605918d3a2 fix: resolve analytics backport conflicts 2026-08-26 16:10:56 +05:30
Sudharsanan Ashok
0dddd00073 feat(analytics): filter sales and purchase analytics by entity (#58402)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
(cherry picked from commit 3f29cdf8d2)

# Conflicts:
#	erpnext/buying/report/purchase_analytics/purchase_analytics.js
#	erpnext/buying/report/purchase_analytics/test_purchase_analytics.py
#	erpnext/selling/report/sales_analytics/sales_analytics.py
#	erpnext/selling/report/sales_analytics/test_sales_analytics.py
2026-08-26 16:10:56 +05:30
Shllokkk
3bf19df761 Merge pull request #58440 from Shllokkk/incorrect-serial-batch-bundle-letter-head
fix: reset hardcoded letter head on Incorrect Serial and Batch Bundle report
2026-08-26 15:49:34 +05:30
Shllokkk
ccdaa92de8 fix: reset hardcoded letter head on Incorrect Serial and Batch Bundle report 2026-08-26 14:50:32 +05:30
Sudharsanan Ashok
6d59065d79 Merge pull request #58424 from frappe/mergify/bp/version-15-hotfix/pr-58405
fix(stock): keep pick list links when refetching stock entry items (backport #58374) (backport #58405)
2026-08-26 13:40:13 +05:30
Jatin3128
228ab2d97e fix: keep source rate on re-fetch when maintain same rate is enabled (backport #57479) (#58332)
* fix: keep source rate on re-fetch when maintain same rate is enabled (backport #57479)

With "maintain same rate" on, re-fetching item details on a row mapped from a
source document (e.g. a Purchase Order) pulled the latest Item Price, giving a
rate the document can never be saved with. Skip the price list fetch for such
rows and keep the source rate, both for a single-row re-fetch and the bulk
apply_price_list path (price list / party / conversion rate change).

The rate is read from the linked source row in the database (not the mutable
target row) and permission-checked against the source document, so an unsaved
edit can't lock in a different rate and a crafted request can't disclose
another document's pricing.

Fixes frappe/erpnext#57436

* fix: resolve linter findings in get_item_details

Add missing type hints on the whitelisted get_item_details
signature and rename maintain_same_rate_enabled's sole "args"
parameter, both flagged by the semgrep security/code-quality
rules. Also drops an extra blank line that ruff-format rejected.

* fix: widen get_item_details doc type hint to include Document

accounts_controller.py calls get_item_details(args, self, ...)
during validate, passing the transaction Document itself, not
a dict/JSON string. The narrower hint tripped Frappe's runtime
argument type validation on every whitelisted call with a live
Document, failing test-record creation across the suite.
2026-08-26 13:14:25 +05:30
Sudharsanan11
e126c4597b fix: resolve stock entry backport conflicts 2026-08-26 13:09:08 +05:30
Sudharsanan11
22377fa86d fix(stock): keep pick list links when refetching stock entry items
(cherry picked from commit 01e0844d40)

# Conflicts:
#	erpnext/stock/doctype/stock_entry/stock_entry.js
2026-08-26 13:09:08 +05:30
Sudharsanan Ashok
9e082a96f7 Merge pull request #58418 from frappe/mergify/bp/version-15-hotfix/pr-58394
fix(stock): validate serial inventory dimensions (backport #58394)
2026-08-26 12:53:35 +05:30
Pandiyan P
bc071d7793 fix(stock): validate serial inventory dimensions (#58394)
* fix(stock): validate serial inventory dimensions

* test(stock): cover serial inventory dimensions

(cherry picked from commit c940bd1e66)

# Conflicts:
#	erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py
#	erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
2026-08-26 12:28:31 +05:30
mergify[bot]
f5ce20f122 fix: keep Currency and Price List section open for foreign currency (backport #58074) (#58112)
* fix: keep Currency and Price List section open for foreign currency (#58074)

The section is marked collapsible with no condition, so it always
rendered collapsed. When the transaction currency differs from the
company currency the exchange rate is relevant and was hidden behind
a click.

Adds collapsible_depends_on so the section starts expanded whenever
the transaction currency differs from the company currency, and stays
collapsed otherwise.

(cherry picked from commit 4a8342496e)

# Conflicts:
#	erpnext/accounts/doctype/pos_invoice/pos_invoice.json
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json
#	erpnext/buying/doctype/purchase_order/purchase_order.json
#	erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
#	erpnext/selling/doctype/sales_order/sales_order.json
#	erpnext/stock/doctype/delivery_note/delivery_note.json
#	erpnext/stock/doctype/purchase_receipt/purchase_receipt.json

* fix: resolve unresolved cherry-pick conflict markers in modified timestamps

Mergify's automatic cherry-pick of #58074 left conflict markers
committed on the modified field, breaking JSON parsing.

---------

Co-authored-by: Jatin3128 <140256508+Jatin3128@users.noreply.github.com>
Co-authored-by: Jatin3128 <jatinsarna8@gmail.com>
2026-08-26 11:35:24 +05:30
Diptanil Saha
d4815cb231 fix(party_ledger_summary): added missing filters for cost_center and projects (#58411) 2026-08-25 22:09:13 +05:30
Raffael Meyer
3ae3009129 fix!: tax net_amount and not_applicable (#54687) 2026-08-25 13:50:03 +02:00
Sudharsanan Ashok
07b6b3defd Merge pull request #58398 from frappe/mergify/bp/version-15-hotfix/pr-58395
fix: respect zero currency precision (backport #58395)
2026-08-25 16:45:17 +05:30
Pandiyan P
6a8462116b fix: respect zero currency precision (#58395)
(cherry picked from commit ce23fcc055)

# Conflicts:
#	erpnext/accounts/test/test_utils.py
2026-08-25 15:51:20 +05:30
Sudharsanan Ashok
1b5239c498 Merge pull request #58354 from frappe/mergify/bp/version-15-hotfix/pr-58179
fix(accounts): supplier group filter not applied on accounts payable … (backport #58179)
2026-08-25 13:04:42 +05:30
Sudharsanan Ashok
7fcbf085a5 Merge pull request #58389 from frappe/mergify/bp/version-15-hotfix/pr-58384
fix: prevent duplicate supplier quotations from portal (backport #58377) (backport #58384)
2026-08-25 12:04:54 +05:30
Sudharsanan11
f8e614f0c7 fix: fix conflicts 2026-08-25 11:47:06 +05:30
pandiyan
c861fbf438 test: verify duplicate supplier quotations are rejected
(cherry picked from commit efe5571ca7)
2026-08-25 05:43:13 +00:00
pandiyan
e1246ae95d fix: prevent duplicate supplier quotations from portal
(cherry picked from commit 39e15c7b2d)

# Conflicts:
#	erpnext/buying/doctype/request_for_quotation/request_for_quotation.py
2026-08-25 05:43:12 +00:00
mergify[bot]
91fc999575 fix: hide supplier name in rfq portal (backport #58373) (#58375)
Co-authored-by: Pandiyan P <pandiyanpalani37@gmail.com>
2026-08-24 17:40:38 +05:30
mergify[bot]
4b569c3ec3 Fix/return qty validation different uom (backport #58298) (#58363)
Co-authored-by: Vishnu Priya Baskaran <145791817+ervishnucs@users.noreply.github.com>
Co-authored-by: Afsal Syed <afsalsyed12@gmail.com>
2026-08-24 17:39:56 +05:30
mergify[bot]
cb8ae93fa3 fix(italy): handle none price_list_rate in e-invoice xml generation (backport #58242) (#58369)
Co-authored-by: Vishnu Priya Baskaran <145791817+ervishnucs@users.noreply.github.com>
2026-08-24 17:39:24 +05:30
Sudharsanan Ashok
91548461c0 Merge pull request #58371 from frappe/mergify/bp/version-15-hotfix/pr-58368
fix: hide rfq status in supplier portal (backport #58368)
2026-08-24 16:35:55 +05:30
Pandiyan P
2dbd224643 fix: hide rfq status in supplier portal (#58368)
(cherry picked from commit 75d6183bb6)
2026-08-24 10:59:54 +00:00
Pandiyan P
b33475e7cf fix: render missing terms before printing (#58367) 2026-08-24 16:28:17 +05:30
mergify[bot]
61238e7c4c fix: aggregate child warehouses in Stock Qty vs Serial No Count report (backport #58134) (#58365)
Co-authored-by: Mohd Haris <haris@frappe.io>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-08-24 10:33:16 +00:00
mergify[bot]
3d4245b9b4 fix: include time logs ending at midnight in timesheet billing summary (backport #58355) (#58356)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-08-24 14:46:36 +05:30
ervishnucs
743f7d8713 fix(accounts): supplier group filter not applied on accounts payable report
(cherry picked from commit 513f19924d)
2026-08-24 07:12:19 +00:00
Vishnu Priya Baskaran
b578fb52d5 fix: allow custom remark on reversal journal entry (#58308)
fix: allow user remark on reversal journal entry
2026-08-19 22:18:13 +05:30
mergify[bot]
fd82c7d691 fix: new docs should refetch incoming rates (backport #58097) (#58294)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-08-19 11:58:32 +00:00
mergify[bot]
88a36a800a fix: block disabled/frozen party on Opportunity and Request for Quotation (backport #57983) (#58034)
* fix: block disabled/frozen customers on Opportunity

Opportunity inherits TransactionBase instead of AccountsController, so
it never ran validate_party_frozen_disabled like Quotation, Sales Order
and Sales Invoice do. A disabled Customer could be saved as an
Opportunity's party and only get caught later at Quotation stage.

Also fixes the party_name Link query on the client: it referenced
erpnext.queries.customer, which was never defined, so disabled
customers showed up in the picker.

(cherry picked from commit 90937ce6d9)

# Conflicts:
#	erpnext/crm/doctype/opportunity/test_opportunity.py

* fix: block disabled/frozen suppliers on Request for Quotation

Request for Quotation overrides validate() entirely and never calls
super().validate(), so it never goes through AccountsController's
party validation. Suppliers also sit in a child table, so the shared
PartyValidator wouldn't have caught it anyway (it only checks a single
top-level party field). A disabled or frozen Supplier could be added
to an RFQ and the RFQ submitted without any warning.

Also filters the suppliers grid's supplier Link field to disabled=0,
matching the same client-side fix applied to Opportunity's party_name.

(cherry picked from commit 4bf65ffc1d)

# Conflicts:
#	erpnext/buying/doctype/request_for_quotation/request_for_quotation.py
#	erpnext/buying/doctype/request_for_quotation/test_request_for_quotation.py

* fix: scope Opportunity party validation to Customer only

validate_party_frozen_disabled only enforces Customer/Supplier/Employee,
so passing opportunity_from straight through silently no-op'd for Lead
and Prospect. Made the Customer-only scope explicit instead of relying
on that implicit fallthrough.

Lead.disabled is not enforced anywhere else in the codebase (lead_query,
the picker used for this same field, only filters status/docstatus), so
deliberately not extending validation to Lead-sourced Opportunities.

(cherry picked from commit 8c0a945417)

* refactor: move RFQ supplier disabled filter to link_filters

Static filters with no doc-dependent values belong on the field
definition, not in JS. Matches the existing pattern used for
Warehouse/Item link_filters elsewhere (e.g. job_card_item.json,
product_bundle_item.json).

(cherry picked from commit 6b35c51ff1)

* fix: resolve backport conflicts for disabled/frozen party validation

The automated backport left unresolved merge conflict markers committed
in request_for_quotation.py, test_request_for_quotation.py and
test_opportunity.py. Also fixes validate_party_frozen_disabled being
called with 3 args here, this branch's version only takes
(party_type, party_name), unlike develop's (company, party_type, party_name).

Dropped test_duplicate_supplier_rejected, test_rfq_blocked_for_supplier_with_prevent_rfqs
and test_rfq_status_lifecycle from the conflict resolution, they don't exist on
this branch and aren't part of this backport.

---------

Co-authored-by: Jatin3128 <jatinsarna8@gmail.com>
2026-08-19 16:58:21 +05:30
mergify[bot]
7883f595d7 fix(stock): fetch item stock UOM in stock reconciliation (backport #58284) (#58290)
Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com>
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-08-19 10:36:34 +00:00
mergify[bot]
c132b99b4e fix: update stock variance account logic which defaults to default expense (backport #57656) (#57675)
Co-authored-by: Afsal Syed <afsalsyed12@gmail.com>
Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com>
2026-08-19 14:41:41 +05:30
mergify[bot]
74c3eeaa44 fix: use user data fields hook (backport #58274) (#58282)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-08-19 10:25:47 +05:30
mergify[bot]
1210c6187d fix: escape interpolated values in text positions across portal and desk templates (backport #58286) (#58287)
Co-authored-by: diptanilsaha <diptanil@frappe.io>
2026-08-19 02:44:35 +05:30
mergify[bot]
d047caf4aa fix: escape on status image for workstations in production status (backport #58279) (#58280)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-08-18 20:27:31 +00:00
mergify[bot]
37f2770809 fix: escape interpolated values in portal, print and desk templates (backport #58273) (#58277)
Co-authored-by: diptanilsaha <diptanil@frappe.io>
2026-08-19 00:35:45 +05:30
mergify[bot]
b03e098684 fix: mirror rounding adjustment on distributed_discount_amount (backport #58047) (#58054)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2026-08-18 12:07:43 +02:00
Lakshit Jain
41aba183de Merge pull request #58160 from frappe/mergify/bp/version-15-hotfix/pr-56175
feat: taxable-base resolver hook for custom charge types (backport #56175)
2026-08-18 11:58:24 +05:30