Commit Graph

61086 Commits

Author SHA1 Message Date
Shariq Ansari
6e9c09e085 Merge pull request #58717 from shariquerik/feat/desk-v2-company-item
feat(desk-v2): contribute the Default Company navigation item kind
2026-09-02 21:31:29 +05:30
shariquerik
e0a862fbe4 docs: keep only what the default company helper's name does not say
Greptile: the first line restated the return expression. What is left is the part
that is not visible from the code -- the renderer reads the same key, which is what
stops the item being filtered against one company and drawn pointing at another.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-02 20:58:42 +05:30
shariquerik
626d8b322c feat(desk-v2): contribute the Default Company navigation item kind
The first navigation item kind contributed by an app that is not frappe, which is
what charter point 6 of frappe/frappe#42226 promised and frappe/frappe#42424 asked
for: an app adds a kind through the same mechanism the framework's own eight go
through, and the framework grows no case for it.

The kind is one folder under `setup/navigation_item_type/default_company/`: the
`Navigation Item Type` record, which arrives at `bench migrate`; `frontend/item.js`
beside it, which arrives at `bench build`; and `default_company.py`, which
`hooks.py` names under `navigation_item_resolvers`. One row in the Setup sidebar
uses it, above the `Company` list.

It points at the company this site works in. That is a destination none of the
eight kinds can express: a `Record` item names its document, and the company's
name is chosen during the setup wizard, so ERPNext has no name to ship. The
renderer computes it from `boot.sysdefaults.company`, which every desk v2 boot
already sends, and the resolver reads the same key -- so the item cannot be
filtered against one company and drawn pointing at another.

The type declares the `Custom` permission rule rather than `Readable DocType`,
and that is the reason it carries server code at all. `Readable DocType` asks
whether a person may read `Company`; the honest question is whether they may open
*this* company, which a `User Permission` decides and which ERPNext sites use
routinely. Measured both ways on a real site: a System Manager pinned to another
company keeps the item under `Readable DocType` and loses it under `Custom`.

The shipped row carries no label on purpose, so the renderer's fallback names the
item after the company itself.

One thing the build found: a `Global Defaults` naming a company somebody has since
deleted makes `has_permission` raise. Left alone, the framework fails the kind
closed and writes an Error Log -- and would write another on every boot of every
session, because the cause is the site's data rather than a passing fault. It is
answered as the same "nothing to point at" an unfinished setup wizard gets. The
leak is invisible to Administrator, who never reaches the document.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-02 20:53:22 +05:30
Shariq Ansari
7fe6b46a9e Merge pull request #58713 from shariquerik/feat/desk-v2-module-rail
feat(desk-v2): ship ERPNext's module-primary rail and its module sidebars
2026-09-02 20:18:24 +05:30
shariquerik
8b93d25824 test: assert the shipped rows, not what the resolver made of them
Greptile P2, and right: the fixture checks read `resolve_navigation`, which has
already dropped a row naming a missing doctype, a heading over nothing and a
linked item whose sidebar emptied. Against that output they were asserting that
the resolver works, which is frappe's test.

They now read the standard `Rail` and `Sidebar` rows as authored. Checked that
each can fail: an orphan `parent_key` and an empty section both insert happily.
A missing doctype does not -- `link_to` is a Dynamic Link and `_validate_links`
refuses the row at import -- so that test now says what it is actually for, a
doctype removed after the rows were imported.

Adds one: every `parent_key` names a section beside it. An orphan is promoted to
the top level rather than dropped, so it loses its nesting in silence.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-02 19:32:06 +05:30
shariquerik
9551f213ae feat(desk-v2): ship ERPNext's module-primary rail and its module sidebars
The module-primary half of frappe/frappe#42226's charter point 2, opposite CRM's
doctype-primary rail: the same table, the same resolver and the same item kinds,
with modules as the rail's primary items.

One `Rail` record of 20 items -- 18 `Sidebar` items over a module sidebar each,
and two `Module` items for the modules whose sidebar would hold one row or none.
The sidebars are authored, not derived: the module *page* keeps deriving from
module contents and the two lists differ on purpose, which is what desk v1's own
curation already says -- 107 doctypes sit on a module page and not in that
module's sidebar, and 101 sidebar links point outside their module.

The rows are converted from desk v1's module sidebars, which stay untouched and
keep serving v1. 486 v1 rows become 317: `Report`, `Dashboard`, `Workspace` and
`Page` items have no desk v2 destination and are not authored, headings left
over nothing are dropped, and two duplicate rows in Accounts go. `Portal` is on
v1's dock and is not authored at all -- it holds no doctypes, so it has neither
a sidebar to open nor a module page to land on.

ERPNext ships no navigation code: the rows arrive through `sync_for`'s
app-rooted walk at migrate.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-02 19:20:00 +05:30
Sagar Vora
4944df8733 Merge pull request #58697 from sagarvora/frt-fixes
fix!: improve validation in financial report template
2026-09-02 17:08:04 +05:30
Sagar Vora
19aa3b20e0 fix!: improve validation in financial report template 2026-09-02 16:46:02 +05:30
rohitwaghchaure
09f5e76b77 fix: rearrange fields in BOM Operation (#58683) 2026-09-02 16:44:16 +05:30
rohitwaghchaure
646c7d042d fix: check write permission in whitelisted document methods (#58689)
* fix: check write permission in whitelisted document methods

* fix: keep production plan status roll-up permission agnostic
2026-09-02 15:40:10 +05:30
Shllokkk
3e08a085b9 Merge pull request #58684 from Shllokkk/lead-add-to-prospect-read-permission-check
fix(crm): check read permission on lead in add_lead_to_prospect
2026-09-02 14:54:01 +05:30
Krishna Pramod Shirsath
2918e98a2b fix(stock): allow creating stock closing balances (#58590) 2026-09-02 08:24:46 +00:00
Shllokkk
02fcdc0337 fix(crm): check read permission on lead in add_lead_to_prospect 2026-09-02 13:50:38 +05:30
Krishna Pramod Shirsath
a2071a6fdd fix: filter cancelled BOMs in BOM Stock Analysis (#58647) 2026-09-02 13:33:15 +05:30
Vishnu Priya Baskaran
dbe153a15e fix: include payment deductions in sales/purchase register ledger bal… (#58437) 2026-09-02 12:30:08 +05:30
Vishnu Priya Baskaran
f16f249a38 fix(pos): use company-currency change amount when netting pos gl entries (#58599) 2026-09-02 12:22:24 +05:30
Vishnu Priya Baskaran
9cb736a271 fix(stock): prorate landed cost charge into transaction currency (#58575)
* fix(stock): prorate landed cost charge into transaction currency

* test(stock): assert landed cost charge transaction-currency amount
2026-09-02 12:10:22 +05:30
Shllokkk
c93815b4ae fix: filter fully ordered items when creating RFQ from Material Request (#58534) 2026-09-02 06:15:04 +00:00
Pandiyan P
2b54a581f8 fix(stock): preserve exchange gain loss journals in lcv (#58505) 2026-09-02 11:44:38 +05:30
Mihir Kandoi
199cae9496 fix(stock): subtract stock qty of same-document rows from batch availability (#58669)
* fix(stock): subtract stock qty of same-document rows from batch availability

filter_batches subtracted a row's transaction-UOM qty from batch quantities that
are in the stock UOM, so a row in an alternate UOM freed less of the batch than
it consumes and the auto-pick could assign a batch that cannot cover the new
row.

* test(stock): cover batch availability with alternate UOM rows
2026-09-02 11:42:37 +05:30
Mihir Kandoi
9261c9b47f fix(stock): assign batch_no only when the first batch covers the full qty (#58668)
* fix(stock): assign batch_no only when the first batch covers the full qty

The auto-pick loop reduced the requested qty per batch and left the last
visited batch on the row, so a qty spanning batches got a batch that could
not fulfil it and failed at submit with a misleading negative-stock error.

Assign the first batch in pick order only when it alone covers the qty.
Otherwise leave batch_no empty so the auto-created Serial and Batch Bundle
splits the qty across batches at submit.

Batches are queried without qty so filter_batches subtracts rows already in
the document from the uncapped batch quantities. Querying on a copy also
stops get_auto_batch_nos from clearing warehouse on the kwargs later used to
pick serial nos.

Fixes #58640

* test(stock): cover batch auto-pick when qty spans batches

* fix(stock): pick serial nos across batches when no batch covers the qty

With batch_no left empty for a qty that spans batches, the serial pick for a
serialised and batched item filtered on [None] and returned nothing, leaving
the row with neither identity. Skip the batch filter when there is no batch so
the serial nos are picked in the configured order across batches; the bundle
built at submit derives each serial's batch.

* test(stock): cover serial pick across batches for batched serial items
2026-09-02 11:42:37 +05:30
Mihir Kandoi
0230879501 ci: allow shallow fetch when fast-forwarding the cached bench (#58666) 2026-09-02 11:20:21 +05:30
kaulith
56a391c522 fix(crm): validate contact email before saving an email campaign (#58667) 2026-09-02 05:34:22 +00:00
Pandiyan P
e74ab38eeb fix(manufacturing): use item warehouses in production plan work orders (#58663) 2026-09-02 04:34:05 +00:00
Pandiyan P
a9b857bdfe fix(stock): ignore cancelled batch entries in valuation (#58659) 2026-09-01 15:49:51 +00:00
Diptanil Saha
a20fc4f931 fix: add missing perm checks on various whitelisted methods (#58652) 2026-09-01 19:12:21 +05:30
Shllokkk
22e3b87621 Merge pull request #58607 from Shllokkk/trial-balance-party-exclude-zero-rounding
fix: round party balances to currency precision in Trial Balance for Party
2026-09-01 15:18:22 +05:30
Mihir Kandoi
e2f24eea15 feat(buying): track supplier quotation order status (#58572) 2026-09-01 08:18:29 +00:00
Pandiyan P
db52e465d0 fix: handle BOM price list currency update (#58638) 2026-09-01 13:31:37 +05:30
Raffael Meyer
5691a7b3c7 fix: explain missing fields when loading party details or taxes (#58627) 2026-09-01 01:31:06 +02:00
Raffael Meyer
0d78261bdf fix: translate label in party validation (#58624) 2026-09-01 00:47:53 +02:00
Diptanil Saha
120e62f208 fix(crm): add missing permission validation on get_contract_template (#58621) 2026-09-01 00:58:58 +05:30
Diptanil Saha
21a3b1c3dc fix: validate POS Settings invoice and search fields on the server (#58611) 2026-08-31 23:43:35 +05:30
Raffael Meyer
d8432d92c8 fix: do not map the same row twice in "Get Items From" (#58617) 2026-08-31 17:15:22 +02:00
Sumit Jain
31761699ae fix: enhance tree view functionality for accounts and cost centers (#58520) 2026-08-31 19:56:24 +05:30
Pandiyan P
7ecfa6b356 fix(stock): correct reservation and pick list quantities (#58613) 2026-08-31 19:38:31 +05:30
Mihir Kandoi
24209ae699 fix(manufacturing): handle duplicate root BOM items (#58614)
* fix(manufacturing): handle duplicate root BOM items

* test(manufacturing): remove duplicate root item test
2026-08-31 14:04:26 +00:00
Pandiyan P
26d000e15f fix(stock): validate serial batch bundle company (#58608) 2026-08-31 12:08:23 +00:00
Mihir Kandoi
dbae23765e fix: keep closed rows out of Update Items (#58609) 2026-08-31 12:03:00 +00:00
Mihir Kandoi
c755e24731 fix: compare updated item quantities in stock UOM (#58603) 2026-08-31 17:05:30 +05:30
Mihir Kandoi
d5789c2e8b feat: close individual transaction items (#57596) 2026-08-31 16:57:48 +05:30
Pandiyan P
0f14f8050f fix: correct bom sorting and stock translations (#58605) 2026-08-31 11:26:42 +00:00
Shllokkk
b1c7657dfa fix: round party balances to currency precision in Trial Balance for Party 2026-08-31 16:43:31 +05:30
rohitwaghchaure
b36895a4c3 feat: production plan visualizer page and summary report fix (#58541)
* fix: production plan summary report tree structure and quantities

* feat: production plan visualizer page

* feat: single screen production plan visualizer with material readiness

* fix: show live stock and received status for production plan materials

* fix: remove duplicate border under production plan visualizer header

* fix: drop page head border on production plan visualizer

* fix: add horizontal margin to production plan visualizer

* fix: apply record level permissions and resolve shared material owners

* fix: list shared raw materials under every finished good that needs them

* feat: open linked documents in a side panel from the visualizer

* fix: never fall back to stored qty when warehouse stock is not readable

* fix: include directly consuming finished goods in material ownership

* fix: show each finished good's own share of shared material demand

* fix: match production plan quantities and labels in the visualizer

* fix: resolve nested sub assembly owners when parent link is missing

* fix: keep every matching owner when resolving sub assemblies by item code

* feat: flat work order list in place of the items to manufacture tree

* fix: flatten items to manufacture rows without changing the table design

* fix: align table numbers, units and progress cells

* fix: scope nested owner resolution to the same sales order

* fix: keep quantity columns numeric and move uom to the item line

* fix: recover all finished goods for consolidated sub assembly rows

* fix: scope raw material owners to the same sales order
2026-08-31 16:24:12 +05:30
Mihir Kandoi
509501c299 feat(manufacturing): add multi-currency support to Blanket Orders (#58472) 2026-08-31 09:45:34 +00:00
Smit Vora
20ea09b4a0 Merge pull request #58483 from ljain112/opening-taxes
fix(taxes): skip tax addition for invoice created from opening invoice tool
2026-08-31 15:05:12 +05:30
Mihir Kandoi
8ca2905a33 feat: valuation method for BOM secondary items (#58431) 2026-08-31 14:51:45 +05:30
Pandiyan P
9087f2cdba fix: widen item name in stock projected qty (#58598) 2026-08-31 08:32:17 +00:00
Mihir Kandoi
6cca7d670b fix: restore isolated loyalty and subcontracting tests (#58587) 2026-08-31 13:40:14 +05:30
Diptanil Saha
4355f8e60e fix(pos): add permission checks on get_invoices (#58591) 2026-08-31 13:23:59 +05:30