Mihir Kandoi
f3315ecb34
ci(mariadb): un-wire warm-bench (no measurable gain)
...
Measured A/B on the self-hosted setup: warm-bench restore 85s vs full
bench init 82s — no gain (slightly slower). bench init is already fast
because the uv/pip caches are mounted warm, so the cache only replaces a
~13s init while adding a ~200MB untar and still running bench build.
Drop BENCH_CACHE_DIR so warm-bench stays inert (the helper functions
remain, matching develop's install.sh).
2026-06-25 13:47:54 +05:30
Mihir Kandoi
61f0a39716
Merge remote-tracking branch 'frappe/develop' into mariadb-ci-fanout
...
# Conflicts:
# .github/helper/hydrate.sh
# .github/helper/install.sh
# .github/helper/start-db.sh
2026-06-25 13:31:28 +05:30
Mihir Kandoi
368ea75e38
ci: address self-review findings
...
- Wire up warm-bench: set BENCH_CACHE_DIR on the setup job so the bench-base
cache actually activates (was inert with no dir set, so every run did a
full bench init). Lives on the node-local bench-staging hostPath; any
miss/failure still falls back to a full init.
- run_ci_step: capture the timeout exit code under `set -e` (the previous
`timeout ...` + `ec=$?` aborted at the timeout line on failure, skipping
::endgroup:: and the exit-code return).
- Raise the per-step timeout 600s -> 1800s so a contended reinstall isn't
killed before the 40-min job timeout.
- Propagate DB through the su re-exec in start-db.sh / hydrate.sh so a
DB=postgres invocation can't silently fall back to the mariadb branch.
- Simplify the coverage job `if` to the equivalent plain non-PR gate.
2026-06-25 13:24:15 +05:30
ruthra kumar
bd53db61cc
Merge pull request #56304 from ruthra-kumar/reports_on_duckdb
...
feat: faster (synced) financial statements using duckdb
2026-06-25 12:40:08 +05:30
ruthra kumar
963bbc8729
refactor: synced reports should be enabled on sites based on requirements
2026-06-25 12:03:42 +05:30
Mihir Kandoi
beec05ce1c
ci: restore postgres durability-off settings in install.sh
...
The fan-out moved fsync/synchronous_commit/full_page_writes=off into
start-db.sh startup flags, but the Postgres workflow runs a postgres:13.3
service container and calls install.sh directly — it never runs start-db.sh.
So those flags never reached the Postgres CI, regressing it to full durability
on a commit-heavy suite. Re-apply them via ALTER SYSTEM (reloadable) in the
DB == "postgres" path, where the service-container workflow executes. MariaDB
is unaffected (DB != postgres).
2026-06-25 12:03:07 +05:30
Mihir Kandoi
694f46f7f7
ci(mariadb): track the erpnext branch for frappe, drop hardcoded develop
...
Remove the `|| 'develop'` fallback on FRAPPE_BRANCH so install.sh resolves the
frappe framework branch from the git context (GITHUB_BASE_REF/GITHUB_REF), the
same as the Postgres workflow. This makes the workflow backportable unchanged:
on version-15-hotfix / version-16-hotfix it now clones the matching frappe
branch instead of develop.
2026-06-25 11:54:26 +05:30
Khushi Rawat
ce44d9192d
Merge pull request #56432 from iamejaaz/fix-letterhead-no-company
...
fix(letter-head): guard company lookups when doc has no company field
2026-06-25 11:11:23 +05:30
ruthra kumar
6a93baacf0
feat(profit-and-loss): implement execute_synced_report with full parity to normal report
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-25 11:01:32 +05:30
ruthra kumar
bb19540816
feat(balance-sheet): implement execute_synced_report with full parity to normal report
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-25 11:01:32 +05:30
ruthra kumar
6b4895bcc9
feat(general-ledger): implement execute_synced_report with full parity to normal report
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-25 11:01:32 +05:30
ruthra kumar
f40cd41801
refactor: DB agnostic method names
2026-06-25 11:01:32 +05:30
ruthra kumar
5c536b8ad1
refactor: maintain sync dependency in report master
2026-06-25 11:01:32 +05:30
ruthra kumar
55862f98f4
refactor(trial-balance): execute_duckdb only reads GL Entry from duckdb
...
Replaces the previous over-engineered stub with 7 short functions.
Account data, Account Closing Balance, and all metadata come from
frappe.db as normal; only tabGL Entry is read from the duckdb_conn.
Reuses get_opening_balance() for Account Closing Balance unchanged,
reuses all downstream compute helpers (calculate_values, prepare_data,
etc.) unchanged.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-25 11:01:32 +05:30
ruthra kumar
b1c8e2cb5c
feat(trial-balance): implement execute_duckdb with full parity to normal report
...
Replaces the placeholder stub with 8 focused functions that mirror the
normal execute() flow using parameterized DuckDB SQL queries: account
fetch, period GL entries, opening balances (with Period Closing Voucher
path), and all filters (cost center, project, finance book, accounting
dimensions). Reuses existing pure-Python processing functions unchanged.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-25 11:01:32 +05:30
ruthra kumar
adb768505a
refactor: reports on duckdb
2026-06-25 11:01:32 +05:30
Mihir Kandoi
dfdfcb8ca1
ci(mariadb): fix stale 'restore DB dump' fan-out comment
...
The shards start MariaDB on the baked datadir; there is no DB dump restore.
Aligns the overview comment with the corrected Hydrate step (greptile).
2026-06-25 06:28:28 +05:30
Mihir Kandoi
fcfaa8843b
Merge pull request #56439 from mihir-kandoi/migrate-request-type-json
...
fix!: switch ERPNext to JSON request body (use_json_request_body)
2026-06-24 22:37:59 +05:30
Mihir Kandoi
3be80d8e87
fix: include list in get_events filters type hint
...
The calendar view sends filters as a list of [doctype, field, op, value]
conditions (filter_area.get()); get_filter_conditions_qb accepts dict or list.
2026-06-24 22:01:55 +05:30
Mihir Kandoi
f034bb55d3
fix: correct process_genericode_import filters hint to str | dict | None
...
import_genericode consumes filters via (filters or {}).items(), so it is a
dict, not a list.
2026-06-24 22:01:55 +05:30
Mihir Kandoi
71b4cc4f12
refactor: drop dead except TypeError in add_bank_accounts
...
frappe.parse_json never raises TypeError (unlike json.loads on a non-str),
so the try/except guarding the parse is now unreachable.
2026-06-24 20:55:01 +05:30
Mihir Kandoi
6a4afd1733
fix: parse native JSON contacts args in CRM prospect/customer endpoints
...
create_prospect_against_crm_deal and create_customer read `contacts`
from form_dict (json.loads(doc.contacts) / customer_data.get("contacts")),
which arrives as a native list under JSON body mode. Use frappe.parse_json.
2026-06-24 20:55:01 +05:30
Mihir Kandoi
3fa7ec656b
fix: parse native JSON schedules arg in make_payment_request
...
make_payment_request(**args) is whitelisted and the client passes
`schedules` as a list, so json.loads(args.get("schedules")) raised
TypeError under JSON body mode. Use frappe.parse_json.
2026-06-24 20:55:01 +05:30
Mihir Kandoi
8854f0c153
feat!: send ERPNext requests as native JSON (use_json_request_body)
...
Opt ERPNext into native application/json request bodies (frappe#40237).
Non-GET requests to erpnext.* endpoints now send args as a JSON body
instead of form-encoded, per-key JSON-stringified values. Safe after the
preceding commits hardened every whitelisted endpoint with frappe.parse_json.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
9955adb2fc
refactor: parse native JSON request args in www/book_appointment/index.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
785c34e0ad
refactor: parse native JSON request args in utilities/query.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
7e8965c6be
refactor: parse native JSON request args in utilities/bulk_transaction.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
7cbebc0545
refactor: parse native JSON request args in support/doctype/issue/issue.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
b3526db643
refactor: parse native JSON request args in stock/utils.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
f707da40ec
refactor: parse native JSON request args in stock/report/stock_qty_vs_batch_qty/stock_qty_vs_batch_qty.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
cb2679ba2c
refactor: parse native JSON request args in stock/get_item_details.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
a6ede74b2d
refactor: parse native JSON request args in stock/doctype/warehouse/warehouse.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
5aeb711f69
refactor: parse native JSON request args in stock/doctype/stock_reconciliation/stock_reconciliation.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
9506a9d62a
refactor: parse native JSON request args in stock/doctype/stock_entry/stock_entry.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
63a1b7d8e5
refactor: parse native JSON request args in stock/doctype/stock_entry/services/subcontracting.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
f5bf9392a0
refactor: parse native JSON request args in stock/doctype/stock_entry/services/manufacturing.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
ddd57ca12e
refactor: parse native JSON request args in stock/doctype/serial_no/serial_no.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
2c7cea2879
refactor: parse native JSON request args in stock/doctype/repost_item_valuation/repost_item_valuation.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
8ca2e99cf2
refactor: parse native JSON request args in stock/doctype/putaway_rule/putaway_rule.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
a11eb741e5
refactor: parse native JSON request args in stock/doctype/purchase_receipt/mapper.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:35 +05:30
Mihir Kandoi
487aff80e0
refactor: parse native JSON request args in stock/doctype/pick_list/mapper.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:34 +05:30
Mihir Kandoi
68e92a893a
refactor: parse native JSON request args in stock/doctype/packed_item/packed_item.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:34 +05:30
Mihir Kandoi
ccd115e769
refactor: parse native JSON request args in stock/doctype/material_request/mapper.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:34 +05:30
Mihir Kandoi
5a77df6560
refactor: parse native JSON request args in stock/doctype/delivery_note/mapper.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:34 +05:30
Mihir Kandoi
04a93cabf1
refactor: parse native JSON request args in stock/doctype/batch/batch.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:34 +05:30
Mihir Kandoi
460b8c5d8d
refactor: parse native JSON request args in setup/doctype/terms_and_conditions/terms_and_conditions.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:34 +05:30
Mihir Kandoi
76705dd736
refactor: parse native JSON request args in setup/doctype/holiday_list/holiday_list.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:34 +05:30
Mihir Kandoi
78f38970c1
refactor: parse native JSON request args in setup/doctype/department/department.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:34 +05:30
Mihir Kandoi
8dd05ca056
refactor: parse native JSON request args in selling/page/point_of_sale/point_of_sale.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:34 +05:30
Mihir Kandoi
f4df5ee0bc
refactor: parse native JSON request args in selling/doctype/sales_order/sales_order.py
...
Use frappe.parse_json instead of json.loads so the whitelisted endpoints
accept native JSON types (list/dict/bool) in addition to JSON strings.
2026-06-24 20:37:34 +05:30