Commit Graph

60990 Commits

Author SHA1 Message Date
Diptanil Saha
98be36ef12 ci: use release token for crowdin translation push (#58454) 2026-08-26 12:16:49 +00:00
Diptanil Saha
687bb9c839 ci: fix crowdin branch (#58452) 2026-08-26 11:38:01 +00:00
rohitwaghchaure
731f03e2f2 feat: option to skip delivery note for service items in sales order (#58297)
* feat: option to skip delivery note for service items in sales order

* fix: reset stale skip delivery flags when setting is disabled

* fix: clear stale skip delivery note flag for non-sales order types

* fix: reset auto skip delivery flags on switch to maintenance order

* refactor: replace sales order skip_delivery_note with item level skip_delivery

* chore: drop skip delivery migration patch

* fix: honor legacy skip_delivery_note flag instead of data migration
2026-08-26 16:28:31 +05:30
Diptanil Saha
fd2057befa ci: crowdin actions (#58447)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-26 16:26:38 +05:30
Jatin3128
4cfa42921f fix(accounts): resolve subscription plans for any reference doctype in Payment Request (#58438)
fix(accounts): resolve subscription plans for any reference doctype and require read permission

get_subscription_details() was hardcoded to only resolve plans for
Sales Invoice, but is_a_subscription in make_payment_request() was set
for any reference doctype with a `subscription` field. Since Purchase
Invoice also has this field (supplier-side subscriptions), creating a
Payment Request against a subscription-linked Purchase Invoice set
is_a_subscription=1 with an empty subscription_plans table.

get_subscription_details() is also whitelisted with no permission
check, letting any logged-in user query which Subscription/plan/qty is
linked to an arbitrary Sales Invoice or Purchase Invoice.

Make plan resolution generic (guarded by Meta.has_field so doctypes
without a subscription field never hit a nonexistent column), derive
is_a_subscription from the resolved plans so the two can't disagree,
and add a frappe.has_permission read check before returning any data.
2026-08-26 16:16:40 +05:30
Jatin3128
8d2aa69e61 feat(accounts): split bank charges from exchange gain/loss on multi-currency transfers (#58071)
In a multi-currency Internal Transfer, the paid-vs-received difference was
booked entirely to Exchange Gain/Loss, so a bank charge entered as a deduction
pushed the Difference Amount non-zero and blocked submission. The exchange
gain/loss row now absorbs only the residual after user-entered deductions,
letting a Bank Charges row and the Exchange Gain/Loss row coexist and net to
zero.
2026-08-26 13:16:24 +05:30
Sudharsanan Ashok
3f29cdf8d2 feat(analytics): filter sales and purchase analytics by entity (#58402)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-08-26 13:02:59 +05:30
Aarol D'Souza
ccc19f2554 Merge pull request #58351 from AarDG10/better-err-msg
fix(company): throw if linked to demo_company field
2026-08-26 12:53:01 +05:30
Mihir Kandoi
2ca02fb305 fix(stock): preserve LCV quantity across stock reconciliation (#58309)
Co-authored-by: RamachandranMD <ramachandran.md@finstein.ai>
2026-08-26 12:16:51 +05:30
Vishnu Priya Baskaran
1b81db4754 fix/payment-request-subscription-plans-population (#57494)
* fix(payment-request): populate subscription plans

* test: add coverage for subscription plans in payment request

---------

Co-authored-by: Dharanidharan2813 <dharanidharans1328@gmail.com>
2026-08-26 11:47:04 +05:30
Vishnu Priya Baskaran
918e5a28db fix(stock): carry accounting dimensions from Landed Cost Voucher char… (#56981)
* fix(stock): carry accounting dimensions from Landed Cost Voucher charges into GL entries

* feat(stock): add accounting dimension fields to Landed Cost Taxes and Charges

The charge row had no dimension fields, so a dimension marked mandatory for
Profit and Loss accounts could not be supplied anywhere on the voucher.

Add the accounting dimensions section, cost center and project, and register
the doctype in accounting_dimension_doctypes so custom dimension fields are
created on it. The section and column break are required for that hook to
place the generated fields correctly.

Cost center deliberately omits the ":Company" default used by Purchase Taxes
and Charges: this child table is also the additional costs table on Stock
Entry and Subcontracting Receipt, and auto-filling it there would change
existing postings.

* refactor(stock): group landed cost charges by expense account and dimensions

get_item_account_wise_lcv_entries keyed its inner map by expense account
alone, so two charge rows posting to the same account - whether in one voucher
or across vouchers - were merged. Amounts accumulated correctly but any
per-row context was lost to whichever row was seen first.

Key the grouping by (expense account, dimension values) and return a list of
charges per receipt item, each carrying its own dimensions, so rows that
differ only by dimension stay distinct.

Dimensions resolve from the charge row first, then the voucher item row.
Blanks are left blank so the GL composers can fall back to the receipt item
and receipt document as before.

* refactor(accounts): allow explicit accounting dimensions on add_gl_entry

get_gl_dict derives dimensions from the parent document and the item row, and
reads only custom dimensions off the item - never cost center or project.
Callers that need to set a dimension from some other source had no way to do
so except by building the args dict by hand.

Add a dimensions argument that is merged into the entry before get_gl_dict is
called, and thread it through the StockController and BaseGLComposer wrappers.

* fix(stock): carry landed cost charge dimensions onto the GL entries

Landed cost charges are posted into the receipt document's ledger, and their
expense account is a Profit and Loss account. Until now the entry took its
dimensions from the receipt item, which cannot know about a voucher created
after it was submitted, so a dimension mandatory for P&L accounts failed.

Take cost center, project and custom dimensions from the charge row, falling
back to the receipt item and receipt document when the row leaves them blank.
Only the leg posting to the charge account is affected; the reclass leg keeps
the item's dimensions so it still nets against the base item entry.

Also skip charges that prorate to zero, and hoist the landed cost lookup in
the Purchase Receipt composer out of the item loop - it was reloading every
voucher once per item.

* fix(stock): report missing mandatory dimensions on the Landed Cost Voucher row

Submitting a voucher re-makes the receipt document's GL entries, so a missing
mandatory dimension surfaced as a GL Entry error naming an account, raised
from the middle of update_landed_cost, with nothing pointing at the row that
caused it.

Check the charge rows during validate instead, against both the mandatory
for P&L / Balance Sheet flags and the per-account Accounting Dimension Filter,
and name the row, the dimension and the account in the message.

The check resolves values through the same fallback chain the GL composers
use, so it does not reject a voucher that would have posted successfully.

* test(stock): cover accounting dimensions on landed cost vouchers

Covers the charge row reaching the GL entry, cost center and project
overriding the receipt item, the blank row still falling back to it, and two
charge rows - and two vouchers - on the same expense account with different
dimensions staying separate entries.

Also covers the mandatory P&L dimension being satisfied from the charge row,
the missing one being reported on the voucher, dimensions surviving a repost,
and each dimension netting to zero on cancellation.

* refactor(lcv): apply custom dimension overrides via .update()

---------

Co-authored-by: nareshkannasln <nareshkannashanmugam@gmail.com>
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-08-26 11:27:08 +05:30
Pandiyan P
c940bd1e66 fix(stock): validate serial inventory dimensions (#58394)
* fix(stock): validate serial inventory dimensions

* test(stock): cover serial inventory dimensions
2026-08-26 11:26:27 +05:30
Raffael Meyer
6bdc18b753 fix(asset): skip missing checkbox columns in asset type patch (#58416) 2026-08-26 02:46:20 +02:00
Khushi Rawat
35b3358a5d Merge pull request #58412 from khushi8112/fix-child-table-accounting-dimension
fix(accounts): prevent child table doctypes as accounting dimensions
2026-08-26 00:47:58 +05:30
khushi8112
55dd11f977 test(accounts): cover single doctype and non-scalar dimension safeguards 2026-08-26 00:36:29 +05:30
Shllokkk
6ddff9c386 Merge pull request #58400 from Shllokkk/reorder-email-single-company-perm
fix: send auto reorder email to all managers in single company setup
2026-08-25 17:38:19 +05:30
Raffael Meyer
84a32c40f4 fix(permissions): grant select on link targets to roles with write access (#58334)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-25 13:31:12 +02:00
khushi8112
7b32d07d1c fix(accounts): prevent child table doctypes as accounting dimensions 2026-08-25 16:09:59 +05:30
Mihir Kandoi
6a6f2ac127 ci: notify support when a PR is released (#58321) 2026-08-25 15:50:21 +05:30
Shllokkk
a01cc92184 test: auto reorder email reaches managers without company user permission 2026-08-25 15:44:29 +05:30
Shllokkk
ae119b1c29 fix: send auto reorder email to all managers in single company setup 2026-08-25 15:44:03 +05:30
Pandiyan P
ce23fcc055 fix: respect zero currency precision (#58395) 2026-08-25 10:06:06 +00:00
rohitwaghchaure
8b8422662c fix: production plan scheduling edge cases (#58388)
* fix: production plan scheduling edge cases

* fix: per-supplier schedule dates and item-wise amended row mapping

* fix: field-based matching for amended production plan rows

* fix: item-level lead time fallback for unconfigured suppliers

* fix: unambiguous amended row pairing and zero-day lead time fallback

* fix: clear sub assembly and material rows on production plan cancel
2026-08-25 14:45:05 +05:30
Sudharsanan Ashok
9cf76c6a68 fix(stock): keep pick list links when refetching stock entry items (#58374) 2026-08-25 07:50:50 +00:00
Sudharsanan Ashok
6fbcfade6c fix(stock): reset bin when no stock ledger entries remain (#58362)
* fix(stock): reset bin when no stock ledger entries remain

update_bin() only writes bins reachable through prev_sle_dict, and that
dict is empty once the last live sle for an item and warehouse is
cancelled or deleted. actual_qty is still recomputed, but stock_value
and valuation_rate stay stale and a repost cannot heal them, so bin
totals drift permanently from the stock balance.

zero those bins after the normal update, guarded by a re-check that no
live sle exists. also drop the prev_sle_dict seeding added earlier in
initialize_previous_data, which never took effect because
initialize_reposting() discards the dict before update_bin() reads it.

* test(stock): cover bin reset when ledger is empty

three cases that all leave an item and warehouse with no live sle:
cancelling the only voucher, deleting it with delete_linked_ledger_entries
on, and reposting over an already emptied ledger. each asserts actual_qty,
valuation_rate and stock_value are all zero.
2026-08-25 11:39:11 +05:30
Mihir Kandoi
5fa68dd068 fix(manufacturing): preserve job card transfer quantity (#58382) 2026-08-24 21:38:12 +05:30
Pandiyan P
ac2bacd3d0 fix: prevent duplicate supplier quotations from portal (#58377) 2026-08-24 18:32:12 +05:30
Pandiyan P
7ec34bab8d fix: hide supplier name in rfq portal (#58373) 2026-08-24 17:38:49 +05:30
Pandiyan P
75d6183bb6 fix: hide rfq status in supplier portal (#58368) 2026-08-24 16:29:05 +05:30
Vishnu Priya Baskaran
560ed25ff7 fix(italy): handle none price_list_rate in e-invoice xml generation (#58242) 2026-08-24 16:26:01 +05:30
Mohd Haris
ef7461cb5b fix: aggregate child warehouses in Stock Qty vs Serial No Count report (#58134)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-08-24 15:42:09 +05:30
Vishnu Priya Baskaran
abf94bc72d Fix/return qty validation different uom (#58298)
Co-authored-by: Afsal Syed <afsalsyed12@gmail.com>
2026-08-24 15:34:43 +05:30
Pandiyan P
59d80b29c4 fix: render missing terms before printing (#58358) 2026-08-24 14:53:08 +05:30
Mihir Kandoi
7149df398a fix: include time logs ending at midnight in timesheet billing summary (#58355) 2026-08-24 08:16:50 +00:00
Khushi Rawat
1b51f8cbd6 Merge pull request #58179 from aerele/fix-accounts-payable-supplier-group-filter
fix(accounts): supplier group filter not applied on accounts payable …
2026-08-24 12:22:21 +05:30
AarDG10
aaa3100efc fix(company): throw if linked to demo_company field
Throws an error msg if user is deleting demo company directly.
2026-08-24 11:10:50 +05:30
Raffael Meyer
64486f34e8 ci: bump po-review-action (#58346) 2026-08-23 17:05:22 +00:00
MochaMind
0ea36160fe fix: sync translations from crowdin (#58289) 2026-08-23 18:51:09 +02:00
MochaMind
6ba623e95f chore: update POT file (#58345) 2026-08-23 13:32:17 +02:00
Raffael Meyer
e71e08959f refactor: use Meta.get_translated_label (#58335) 2026-08-22 00:28:55 +02:00
Raffael Meyer
eae36c2d67 fix(i18n): translate get_label results at presentation with DocType context (#57217) 2026-08-21 23:19:36 +02:00
Jatin3128
275844d496 fix(journal-entry): avoid full grid re-render per row in set_exchange_rate (#58328)
refresh() loops over every row in the accounts child table and calls
set_exchange_rate() for each one. That function unconditionally ended
with frm.refresh_field("accounts"), rebuilding the whole grid (header,
pagination, current page) on every single row. For large child tables
this makes opening the form scale badly with row count.

Use grid.refresh_row(cdn) instead, which only re-renders the row that
actually changed and is a no-op for rows outside the current page.

Measured on a 1000-row Journal Entry: ~8.5s to first rendered row and
~7.9s of blocked main thread before this fix, ~2.3s and ~1.9s after.
2026-08-21 01:57:04 +05:30
Mihir Kandoi
624d402143 fix(projects): respect permissions in timesheet billing summary (#58320) 2026-08-20 09:43:18 +00:00
Mihir Kandoi
2328e6da94 fix: changing product bundle warehouse should change packed items war… (#58316) 2026-08-20 12:35:04 +05:30
Mihir Kandoi
941baffdda fix: correct to and from date filters in timesheet billing summary re… (#58317) 2026-08-20 04:12:30 +00:00
Pandiyan P
7faadb8282 fix: stop doubling totals in timesheet billing summary (#58311) 2026-08-20 02:26:23 +00:00
Mihir Kandoi
e8b214e7d3 chore: remove mistakenly committed file (#58310) 2026-08-19 15:49:02 +00:00
Mihir Kandoi
8320c77694 fix(manufacturing): scope secondary items to job card (#58260) 2026-08-19 20:53:53 +05:30
Mihir Kandoi
696f0df811 fix(stock): update pick list status for product bundles (#58306) 2026-08-19 20:52:47 +05:30
Mihir Kandoi
deeb787f57 fix(stock): support shared target UOM conversions (#58305) 2026-08-19 18:29:59 +05:30