Commit Graph

60077 Commits

Author SHA1 Message Date
Mihir Kandoi
271f8cf1ca Merge pull request #56948 from aerele/feat/production-plan-group-rm-warehouse
feat(manufacturing): allow group warehouse for raw material availability in production plan
2026-07-09 20:52:18 +05:30
Mihir Kandoi
1eed00f5d4 Merge pull request #56428 from raghavisruia/item-allow-negative-stock-confirmation
feat: confirmation dialog when enabling negative stock on Item
2026-07-09 20:52:03 +05:30
Mihir Kandoi
4fbb20fbd9 Merge pull request #56255 from akhtarmohsin/fix-variant-of-filter-item-list
Fix Variant Of filter to show only template items
2026-07-09 20:41:54 +05:30
Mihir Kandoi
8583f0ba05 Merge pull request #56979 from harisansari008/fix/bom-routing-update-operations
fix: update BOM operations when routing is changed
2026-07-09 20:41:12 +05:30
Mihir Kandoi
1b6d3ee870 Merge pull request #56561 from aerele/fix/report-currency
fix: use company currency instead of global default in report
2026-07-09 20:38:55 +05:30
Sudharsanan11
2247ef9a50 test(manufacturing): add production plan group warehouse tests
verify child-stock aggregation, transfer sourcing from child warehouses,
that a for warehouse outside the group is rejected, and that a for
warehouse is required when raw materials are fetched.
2026-07-09 20:37:04 +05:30
Sudharsanan11
0574a0d95e feat(manufacturing): allow group warehouse for raw material availability in production plan
add an optional raw material group warehouse on production plan. when set,
raw material availability is checked across its child warehouses (bin rows
aggregated), while material is still received into for warehouse. for
warehouse is restricted to a child of the group and required when raw
materials are fetched; a group warehouse can never reach a material request
line. when the group is left blank, availability falls back to for warehouse
and the previous flow.
2026-07-09 20:37:04 +05:30
Sudharsanan11
b625525b03 fix(manufacturing): accept plain dict for doc in get_items_for_material_requests
the whitelisted endpoint typed doc as str | frappe._dict | Document, so a
json request body (a plain dict) failed pydantic type validation. widen to
str | dict | Document, matching the convention used elsewhere in erpnext.
2026-07-09 20:37:04 +05:30
Mihir Kandoi
87e7e53a6a Merge pull request #56932 from aerele/fix/work-order-planned-date-validation
fix: validate planned end date is not before planned start date in wo…
2026-07-09 20:34:57 +05:30
Mihir Kandoi
97533812e7 Merge pull request #56925 from aerele/fix/batch-bin-lookup-delivery-note
perf: batch bin lookups in delivery note stock update
2026-07-09 20:34:37 +05:30
Mihir Kandoi
508f03a73e Merge pull request #56923 from aerele/fix/reorder-item-warehouse-lookup-perf
perf: avoid per-row Warehouse doc fetches in auto reorder job
2026-07-09 20:33:56 +05:30
Mihir Kandoi
8dd56ecba5 Merge pull request #56913 from aerele/fix/trend-report-column-translations
fix: make trend report based-on and group-by column labels translatable
2026-07-09 20:33:13 +05:30
Mihir Kandoi
d6682703fb Merge pull request #56909 from aerele/fix/sync-variant-item-code-on-abbr-rename
fix(stock): rename variant item_code/item_name when attribute abbreviation changes
2026-07-09 20:32:50 +05:30
Mihir Kandoi
015fb61b10 Merge pull request #56984 from aerele/fix/apply-price-list-doc-dict
fix(stock): repair client calls broken by type-hint and module refactors
2026-07-09 20:31:24 +05:30
Sudharsanan11
4d629df299 fix(stock): point stock entry client calls at services module
The stock_entry_handler modules were moved to services; update the
retention, expired-batch and subcontract call paths in the client
so the whitelisted methods resolve again.
2026-07-09 18:52:31 +05:30
Sudharsanan11
5956d3e092 fix(stock): accept dict for doc arg in apply_price_list
The type-hint refactor rejected the doc dict sent by the form
controller; broaden the annotation to match ctx and fix the
cts= kwarg typo in transaction_base.
2026-07-09 18:48:01 +05:30
Mohd Haris
758a837de4 fix: update BOM operations when routing is changed
The routing field handler only fetched operations from the routing when
the operations table was empty. When a new BOM version is created (via
"New Version"), operations are copied from the source BOM, so selecting a
different routing left the old operations in place - both in the form and
after saving.

Drop the `!frm.doc.operations.length` guard from the routing handler so
that (re)selecting a routing always refetches the operations from that
routing via the existing get_routing method, which clears and repopulates
the operations table.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 18:01:17 +05:30
Pandiyan P
8b3caeb578 fix(stock): pick list serial batch posting date (#56957)
* fix(stock): fall back to current date/time for serial and batch bundle posting datetime

Pick List has no posting_date/posting_time fields, so creating or updating a
Serial and Batch Bundle from a Pick List row crashed with
"TypeError: combine() argument 1 must be datetime.date, not None". Fall back
to today/now when the parent voucher doesn't carry its own posting date.

Fixes #56951

* fix(stock): accept a plain dict for add_serial_batch_ledgers' doc and child_row

The whitelisted add_serial_batch_ledgers only converted child_row into an
attribute-accessible frappe._dict when it arrived as a JSON string, and doc's
type hint only allowed Document | str. Frappe's JSON API delivers both as
plain dicts (see frappe.app.make_form_dict, which parses the request body
with orjson and only wraps the top-level dict, not nested values), so every
real request was rejected before the handler body ever ran: first with a
FrappeTypeError on doc, and once that's fixed, with an AttributeError on
child_row.serial_and_batch_bundle. parse_json already wraps a plain dict in
frappe._dict (and leaves a real Document instance untouched), so routing
child_row through it unconditionally fixes both.
2026-07-09 17:28:03 +05:30
Pandiyan P
e2178a5f19 feat(manufacturing): create material request for raw materials from work order (#56961)
* feat(manufacturing): create material request for raw materials from work order

allow raising a material transfer request directly from a work order,
mirroring the existing job card flow, so stores can fulfil it into wip
before the actual stock entry happens

* test(manufacturing): cover work order material request flow

verify the material request created from a work order carries the
right bom/purpose onto the resulting stock entry, and that the work
order status still moves to in process on a partial material-request
transfer
2026-07-09 17:27:21 +05:30
mergify[bot]
d418dd9e70 fix(patch): moved create_company_custom_fields from pre_model_sync to post_model_sync (backport #56962) (backport #56965) (#56970)
Co-authored-by: diptanilsaha <diptanil@frappe.io>
2026-07-09 10:36:50 +00:00
Diptanil Saha
1885f9fb35 Merge pull request #56674 from diptanilsaha/fix/frappe_crm_sync
fix(crm_settings): skip allowed users check when frappe crm is installed locally
2026-07-09 15:30:46 +05:30
MochaMind
49228b458d fix: sync translations from crowdin (#56943) 2026-07-09 15:30:26 +05:30
Khushi Rawat
e3fb1340e1 Merge pull request #56964 from khushi8112/fix/depr-schedule-precision-match
fix: match depreciation schedule rows at currency precision to avoid duplicate JEs
2026-07-09 14:43:13 +05:30
khushi8112
947ed5dfe1 fix: match depreciation schedule rows at currency precision to avoid duplicate JEs 2026-07-09 14:14:44 +05:30
diptanilsaha
0f987d7135 chore: patch to clear out allowed users on crm_settings if frappe crm is installed on the site 2026-07-09 12:37:47 +05:30
diptanilsaha
2de423e225 fix(frappe_crm_api): handle failure for after_app_install and after_app_uninstall 2026-07-09 12:37:47 +05:30
diptanilsaha
c86aa2d6fe feat(crm_settings): auto-update crm sync settings on frappe crm install and uninstall 2026-07-09 12:37:41 +05:30
diptanilsaha
41badb3d74 fix(crm_settings): skip allowed users check when frappe crm is installed locally 2026-07-09 12:01:49 +05:30
Abdeali Chharchhodawala
95e2ce6d85 feat: add grouping by dimension functionality in financial reports (#54650)
Co-authored-by: Copilot <copilot@github.com>
2026-07-08 19:04:09 +05:30
Raffael Meyer
c12e3fba5e feat(sla): filter service level agreement link by document type (#56954) 2026-07-08 13:47:57 +02:00
Smit Vora
e7f81de159 Merge pull request #54855 from Abdeali099/growth-view-with-cfs-54675
refactor(financial-report): fix row transformation for growth calculations
2026-07-08 16:13:44 +05:30
Abdeali Chharchhoda
aad287d09e fix: enhance growth view filtering by validating period keys 2026-07-08 16:03:28 +05:30
Abdeali Chharchhoda
4c7499600c fix: update formatting of growth view for FS report 2026-07-08 16:03:28 +05:30
Abdeali Chharchhoda
698876672d refactor: simple utility for growth value computation for custom FS report 2026-07-08 16:03:28 +05:30
Abdeali Chharchhoda
c179460c98 refactor(financial-report): fix row transformation for growth calculations 2026-07-08 16:03:28 +05:30
Diptanil Saha
95212e5738 fix(tnc): get_terms_and_conditions render_template with safe_exec (#56944) 2026-07-08 00:18:35 +00:00
Diptanil Saha
8a940af7e1 fix: added permission checks on various whitelisted functions (#56745)
* fix: added permission checks on various whitelisted functions

* fix: permission checks on `get_party_account` and using "select" `ptype`

* test(`BootStrapTestData`): assign `Accounts User` role to User `test@example.com`
2026-07-08 05:29:52 +05:30
Shllokkk
c94973a932 Merge pull request #56926 from Shllokkk/pricing-rule-template-variant-validation
fix: validate template and its variant in the same Pricing Rule
2026-07-07 19:59:10 +05:30
Dany Robert
be10c8ced9 fix: precision issue causing reconciliation error (#54043)
* fix: precision issue causing reconciliation error

* chore: code styling changes

* test: precision causing reconciliation failure

* fix: enhance payment reconciliation tests for floating-point precision

* fix(test): incorrect assertion on status

---------

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
2026-07-07 19:44:35 +05:30
pandiyan
2ec780cb35 fix: validate planned end date is not before planned start date in work order 2026-07-07 16:34:58 +05:30
MochaMind
eb37d3b14b fix: sync translations from crowdin (#56919) 2026-07-07 12:59:22 +02:00
Shllokkk
a88048b378 fix: validate template and its variant in the same Pricing Rule 2026-07-07 13:55:22 +05:30
pandiyan
5da878d25f perf: batch bin lookups in delivery note stock update
update_current_stock() in delivery_note.py used to call
frappe.db.get_value("Bin", ...) separately for every row in items and
every row in packed_items - so a delivery note with 200 items and 200
packed items made 400 separate database calls on every save.

now it groups item codes by warehouse and fetches bin data with one
query per distinct warehouse, then assigns actual_qty/projected_qty to
each row from that result - same values as before, far fewer database
calls, and no cross-product over-fetch across warehouses.
2026-07-07 13:00:08 +05:30
pandiyan
6beb3d2509 perf: avoid per-row Warehouse doc fetches in auto reorder job
get_item_warehouse_projected_qty ran an uncached frappe.get_doc per Bin
row to walk the warehouse parent chain, re-fetching the same ancestors
for every item sharing a warehouse. Preload the warehouse parent map
once and walk it in memory instead.
2026-07-07 11:43:52 +05:30
pandiyan
015fa68fc0 fix: make trend report based-on and group-by column labels translatable
based_wise_columns_query() and group_wise_column() in trends.py built
column labels as raw strings, so "Item", "Item Name", "Customer",
"Supplier", "Territory", "Currency", etc. never went through _() and
stayed in English regardless of the user's language, unlike the
period and total columns right next to them which were already
wrapped correctly.
2026-07-06 18:41:06 +05:30
S Sakthivel Murugan
b72ecdda0d test: add regression test for trends chart total row 2026-07-06 17:54:25 +05:30
S Sakthivel Murugan
e6f9149ad7 fix: use company currency instead of global default in report 2026-07-06 17:54:25 +05:30
rohitwaghchaure
607f0e943f fix: workspace for stock and manufacturing (#56906) 2026-07-06 11:48:15 +00:00
MochaMind
be93530b5f fix: sync translations from crowdin (#56866) 2026-07-06 10:49:55 +02:00
pandiyan
e718a70b26 test: cover variant item_code/item_name rename on abbreviation change
Add regression coverage for the new abbreviation-rename propagation:
a simple item_code rename, item_name derived from a template whose
item_name differs from its item_code, and a manually customized
item_name getting rebuilt rather than left stale.
2026-07-06 14:15:40 +05:30