Commit Graph

59389 Commits

Author SHA1 Message Date
Mihir Kandoi
05e44ca63a Merge pull request #56546 from mihir-kandoi/pg-rawsql-to-orm
refactor: convert convertible raw frappe.db.sql to ORM
2026-06-26 12:21:25 +05:30
Mihir Kandoi
0583349ae4 test: convert aggregate/pluck/positional raw SQL to ORM
A deeper re-audit (with an adversarial skeptic) of the queries left raw
in the prior commit found more that have exact ORM equivalents:

- scalar SUM/MAX  -> frappe.qb + Sum/Max .run()[0][0]
- SUM ... GROUP BY -> frappe.qb .groupby().select(Sum().as_()) run(as_dict)
- name IN (values) -> get_all(filters={'f': ['in', ...]})
- sql_list(select col) -> get_all(pluck='col')
- bulk UPDATE ... = NULL/value -> frappe.db.set_value(filters, field, val)
- positional as_list reads -> get_all(..., as_list=True) (+ sorted())

Note: get_value(dt, filters, 'sum(x)') and get_all(fields=['sum(x)'])
are rejected by frappe ('SQL functions are not allowed as strings'), so
aggregates go through frappe.qb. get_all(as_list=True) returns a tuple
(not a list), so consumers that mutate use sorted().

All affected test modules pass on MariaDB.
2026-06-26 11:34:31 +05:30
Mihir Kandoi
0776f7f7fa test: convert trivially-equivalent raw SQL to ORM helpers
Convert test-only raw frappe.db.sql calls that have an exact ORM
equivalent: full-table/filtered deletes -> frappe.db.delete, count ->
frappe.db.count, row-existence assertions -> frappe.db.exists,
single-row scalar fetches -> frappe.db.get_value, and simple
equality/range-filter selects -> frappe.get_all. No behaviour change.

Raw SQL that genuinely needs it is left as-is (dynamic identifiers,
aggregates/group-by, positional as_list consumers, DB-catalog
introspection).
2026-06-26 10:44:17 +05:30
Mihir Kandoi
0e54e532ff refactor(accounts): use frappe.get_all for trial balance account fetch
The Account metadata fetch in the DuckDB trial-balance path is a plain
static SELECT (fixed columns, single company filter, order by lft).
Convert it to frappe.get_all. Verified on Postgres: identical 98 rows,
same order and same dict payload as the raw query.
2026-06-26 10:44:05 +05:30
Mihir Kandoi
ea9bf932d8 Merge pull request #56510 from frappe/revert-56497-serial-batch-bundle-print-none-fix
Revert "fix: handle missing serial and batch bundle in print format"
2026-06-26 10:18:43 +05:30
Mihir Kandoi
993a011005 Revert "fix: handle missing serial and batch bundle in print format" 2026-06-26 10:07:23 +05:30
Nabin Hait
507bc0930e Merge pull request #56412 from frappe/chore/fixed-asset-register-test-coverage
test: Fixed Asset Register report coverage
2026-06-25 22:13:39 +05:30
MochaMind
c3d2ebd734 fix: sync translations from crowdin (#56396) 2026-06-25 16:35:56 +02:00
Shllokkk
142d80d7de Merge pull request #56497 from Shllokkk/serial-batch-bundle-print-none-fix
fix: handle missing serial and batch bundle in print format
2026-06-25 19:22:23 +05:30
Mihir Kandoi
c8f86099e2 Merge pull request #56479 from mihir-kandoi/messages/crm
chore: rewrite user-facing messages in crm module
2026-06-25 18:47:25 +05:30
Mihir Kandoi
ab1e949752 Merge pull request #56482 from mihir-kandoi/messages/erpnext_integrations
chore: rewrite user-facing messages in erpnext_integrations module
2026-06-25 18:43:52 +05:30
Mihir Kandoi
8ad90338a3 Merge pull request #56469 from mihir-kandoi/messages/controllers
chore: rewrite user-facing messages in controllers module
2026-06-25 18:38:23 +05:30
Mihir Kandoi
d2ff0913df Merge pull request #56476 from mihir-kandoi/messages/projects
chore: rewrite user-facing messages in projects module
2026-06-25 18:35:00 +05:30
Mihir Kandoi
05dd44246f Merge pull request #56475 from mihir-kandoi/messages/subcontracting
chore: rewrite user-facing messages in subcontracting module
2026-06-25 18:33:55 +05:30
Mihir Kandoi
6e22f4b063 Merge pull request #56498 from mihir-kandoi/messages/exchange-rate-server-grammar
chore: fix grammar in Exchange Rate Revaluation validation message
2026-06-25 18:28:11 +05:30
Mihir Kandoi
d737c39131 Merge pull request #56473 from mihir-kandoi/messages/selling
chore: rewrite user-facing messages in selling module
2026-06-25 18:24:13 +05:30
Nabin Hait
38385432f6 test: assert group-by totals on delta to avoid shared-category leak
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 18:22:58 +05:30
Nabin Hait
78fd06048f style: apply ruff formatting
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 18:21:08 +05:30
Mihir Kandoi
1b68445313 Merge pull request #56480 from mihir-kandoi/messages/utilities
chore: rewrite user-facing messages in utilities module
2026-06-25 18:17:50 +05:30
Nabin Hait
3a3f56350f Merge remote-tracking branch 'origin/develop' into chore/fixed-asset-register-test-coverage
# Conflicts:
#	erpnext/assets/report/fixed_asset_register/test_fixed_asset_register.py
2026-06-25 18:10:53 +05:30
Mihir Kandoi
6d035274d7 Merge pull request #56478 from mihir-kandoi/messages/maintenance
chore: rewrite user-facing messages in maintenance module
2026-06-25 18:06:57 +05:30
Mihir Kandoi
df6b8cdd60 Merge pull request #56481 from mihir-kandoi/messages/support
chore: rewrite user-facing messages in support module
2026-06-25 18:04:34 +05:30
Mihir Kandoi
62f7374942 Merge pull request #56477 from mihir-kandoi/messages/regional
chore: rewrite user-facing messages in regional module
2026-06-25 18:00:07 +05:30
Mihir Kandoi
f571ba749f Merge pull request #56468 from mihir-kandoi/messages/manufacturing
chore: rewrite user-facing messages in manufacturing module
2026-06-25 17:56:28 +05:30
Mihir Kandoi
f151b2abee Merge pull request #56485 from mihir-kandoi/messages-js/public
chore: rewrite user-facing JS messages in public module
2026-06-25 17:56:19 +05:30
Mihir Kandoi
27a7ec82c2 Merge pull request #56471 from mihir-kandoi/messages/setup
chore: rewrite user-facing messages in setup module
2026-06-25 17:54:53 +05:30
Mihir Kandoi
c769bc24c9 Merge pull request #56495 from mihir-kandoi/messages-js/support
chore: rewrite user-facing JS messages in support module
2026-06-25 17:54:41 +05:30
Mihir Kandoi
fa9e775e9d Merge pull request #56494 from mihir-kandoi/messages-js/subcontracting
chore: rewrite user-facing JS messages in subcontracting module
2026-06-25 17:54:25 +05:30
Nabin Hait
fe863d2e7f Merge pull request #56347 from frappe/chore/ar-ap-report-test-coverage
test: AR/AP journal-entry payments and credit notes
2026-06-25 17:49:47 +05:30
Nabin Hait
a97b944bec Merge pull request #56346 from frappe/chore/stock-balance-report-test-coverage
test: Stock Balance include-zero and ageing checkbox filters
2026-06-25 17:49:21 +05:30
Nabin Hait
851439e2d9 Merge pull request #56327 from frappe/chore/cash-flow-report-test-coverage
test: Cash Flow report correctness coverage
2026-06-25 17:48:48 +05:30
Mihir Kandoi
0dc649bae9 Merge pull request #56493 from mihir-kandoi/messages-js/www
chore: rewrite user-facing JS messages in www module
2026-06-25 17:48:27 +05:30
Mihir Kandoi
8de7a25d16 Merge pull request #56496 from mihir-kandoi/messages-js/projects
chore: rewrite user-facing JS messages in projects module
2026-06-25 17:48:08 +05:30
Mihir Kandoi
e86be20f44 Merge pull request #56490 from mihir-kandoi/messages-js/manufacturing
chore: rewrite user-facing JS messages in manufacturing module
2026-06-25 17:47:56 +05:30
Nabin Hait
fa99849e48 Merge pull request #56326 from frappe/chore/gl-financial-statements-test-coverage
test: General Ledger report filter coverage
2026-06-25 17:47:45 +05:30
Mihir Kandoi
21dbd0007b Merge pull request #56492 from mihir-kandoi/messages-js/buying
chore: rewrite user-facing JS messages in buying module
2026-06-25 17:47:36 +05:30
Nabin Hait
8a581d4e4e Merge pull request #56324 from frappe/chore/trial-balance-test-coverage
test: correctness coverage for Trial Balance report
2026-06-25 17:47:14 +05:30
Mihir Kandoi
b077491fc7 Merge pull request #56491 from mihir-kandoi/messages-js/setup
chore: rewrite user-facing JS messages in setup module
2026-06-25 17:47:03 +05:30
Mihir Kandoi
f46e9a0bb5 Merge pull request #56484 from mihir-kandoi/messages-js/accounts
chore: rewrite user-facing JS messages in accounts module
2026-06-25 17:46:49 +05:30
Mihir Kandoi
c100e1c94c Merge pull request #56489 from mihir-kandoi/messages-js/selling
chore: rewrite user-facing JS messages in selling module
2026-06-25 17:46:46 +05:30
Mihir Kandoi
b36eeb7813 Merge pull request #56488 from mihir-kandoi/messages-js/stock
chore: rewrite user-facing JS messages in stock module
2026-06-25 17:46:07 +05:30
Nabin Hait
46917cc36f Merge pull request #56320 from frappe/chore/stock-report-test-coverage
test: correctness coverage for Stock Ledger and Stock Projected Qty reports
2026-06-25 17:45:01 +05:30
Mihir Kandoi
70bd57d3e7 chore: fix grammar in Exchange Rate Revaluation validation message
"to getting entries" -> "to get entries". Matches the client-side message
fixed in #56484 so the same missing Company/Posting Date validation reads
identically on client and server. Part of #53976.
2026-06-25 17:44:57 +05:30
Mihir Kandoi
660fc4191c chore: rewrite user-facing JS messages in Support module
Conservative cleanup of frappe.throw/msgprint messages per the message style
guide; meaning, severity, and .format() arguments are unchanged:

- index bare {} placeholders as {0}/{1}/... so translators can reorder
- move f-strings / .format() / concatenation out of _() (they break gettext
  extraction and never translate)
- wrap translatable dynamic values (DocType/Select labels) in _()
- fix grammar and colloquialisms
- drop no-op _() wrapping runtime-built strings

Part of #53976.
2026-06-25 17:44:29 +05:30
Nabin Hait
555ce3fc2a Merge pull request #56322 from nabinhait/test-project-percent-complete
test(projects): cover untested project and project-template functions
2026-06-25 17:44:19 +05:30
Mihir Kandoi
8cd420953c chore: rewrite user-facing JS messages in Public module
Conservative cleanup of frappe.throw/msgprint messages per the message style
guide; meaning, severity, and .format() arguments are unchanged:

- index bare {} placeholders as {0}/{1}/... so translators can reorder
- move f-strings / .format() / concatenation out of _() (they break gettext
  extraction and never translate)
- wrap translatable dynamic values (DocType/Select labels) in _()
- fix grammar and colloquialisms
- drop no-op _() wrapping runtime-built strings

Part of #53976.
2026-06-25 17:44:14 +05:30
Nabin Hait
57cb133aaf Merge pull request #56325 from nabinhait/test-task-timesheet-coverage
test(projects): cover untested task, timesheet, and activity-cost functions
2026-06-25 17:43:16 +05:30
Shllokkk
548d90df4f fix: handle missing serial and batch bundle in print format 2026-06-25 17:42:47 +05:30
Mihir Kandoi
64fef7e108 chore: rewrite user-facing JS messages in Projects module
Conservative cleanup of frappe.throw/msgprint messages per the message style
guide; meaning, severity, and .format() arguments are unchanged:

- index bare {} placeholders as {0}/{1}/... so translators can reorder
- move f-strings / .format() / concatenation out of _() (they break gettext
  extraction and never translate)
- wrap translatable dynamic values (DocType/Select labels) in _()
- fix grammar and colloquialisms
- drop no-op _() wrapping runtime-built strings

Part of #53976.
2026-06-25 17:38:20 +05:30
Mihir Kandoi
ad27dc4907 chore: rewrite user-facing JS messages in Subcontracting module
Conservative cleanup of frappe.throw/msgprint messages per the message style
guide; meaning, severity, and .format() arguments are unchanged:

- index bare {} placeholders as {0}/{1}/... so translators can reorder
- move f-strings / .format() / concatenation out of _() (they break gettext
  extraction and never translate)
- wrap translatable dynamic values (DocType/Select labels) in _()
- fix grammar and colloquialisms
- drop no-op _() wrapping runtime-built strings

Part of #53976.
2026-06-25 17:38:12 +05:30