Skip to content

v1.2.1 — NPD Tooling orders & Project Connections

Latest

Choose a tag to compare

@Guru107 Guru107 released this 27 Jul 11:43
· 0 commits to develop since this release
c2becd2

Note on v1.2.0

This supersedes v1.2.0, which was tagged and then withdrawn. The repository had immutable releases enabled at the time, so deleting the v1.2.0 release left an immutable tag that could not be recreated or moved. v1.2.1 republishes the same work under a fresh version — there is no code difference between the two beyond the version string.

Overview

Adds tooling tracking to the NPD Project Module: a customer-PO tooling order doctype with recovery tracking against payments and invoices, a recovery register report, and Project form integration.

Backward compatible — no breaking changes, no data migration required beyond bench migrate.

What's Changed

Features

NPD Tooling orders (#9)

  • New NPD Tooling doctype — a customer-PO tooling order with child tool lines, so a part needing several tools (each possibly from a different supplier) is tracked as one order.
  • Child tables: NPD Tooling Item (tool lines), NPD Tooling Payment (receipts), NPD Tooling Invoice (billing reference).
  • Recovery combines money paid against linked Sales Invoices with manual advance allocations, so it counts before a tax invoice exists and never double-counts a Payment Entry already applied to a linked invoice.
  • Bulk customer payments can be allocated across multiple tooling POs.
  • Recovery is auto-derived from Sales Invoice allocations.
  • Seeds a Tooling Item Group so tool Items classify consistently (create_tooling_item_group patch).

Tooling Recovery Register report (#9)

  • Recovery status, ageing from the customer PO date, and outstanding amounts across tooling orders.

NPD Tooling in the Project Connections tab (#10)

  • Project's Connections tab now surfaces NPD Tooling, via a custom DocType Link created in after_install.
  • NPD Tooling.project matches the Project dashboard's default fieldname, so the connection count resolves automatically.
  • An after_migrate hook re-asserts the link on every migrate. This matters because custom=1 does not survive a doctype re-import: when project.json changes, Frappe reloads it via delete_doc(..., for_reload=True), dropping every DocType Link row on Project. A one-shot patch cannot recover from that once logged.

Packaging

  • Declares [tool.bench.frappe-dependencies] in pyproject.toml (frappe and erpnext, both >=15.0.0,<17.0.0), so bench get-app / bench install-app rejects an unsupported major up front instead of failing at runtime. Previously no compatibility check ran at all.
  • CLAUDE.md corrected: it claimed v15 only in three places; both majors are supported.

Fixes

  • The connection's idempotency guard matches on parent + link_doctype rather than pinning custom=1, so a site carrying the same link as a standard row from fixtures no longer ends up with NPD Tooling listed twice.
  • Removed a redundant frappe.db.commit() from the after_migrate hook — migrate already invokes these hooks inside its @atomic phase, and the manual commit partially defeated that rollback.

Uninstall

  • before_uninstall removes the Tooling Item Group (only when no Items reference it), the reports, and the custom Project connection (only the custom=1 rows this app creates).

Verification

  • Full app suite 72/72 on Frappe/ERPNext v15.
  • pre-commit run --all-files clean; Linters and CI green on the release commit.
  • Connection recovery verified empirically: link deleted on a site whose Patch Log already contained the earlier one-shot patch, bench migrate restored it and it reappeared in the Project form's Connections.

Upgrading

bench --site <site> migrate

Full changelog: v1.1.0...v1.2.1