Skip to content

[Backport version-15] feat(lease): implement lease renewal enhancement and UI consolidation#62

Merged
aakvatech merged 1 commit into
version-15from
backport-61-to-version-15
Jun 8, 2026
Merged

[Backport version-15] feat(lease): implement lease renewal enhancement and UI consolidation#62
aakvatech merged 1 commit into
version-15from
backport-61-to-version-15

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Backport of #61 to version-15.


PR Description

Summary
This PR introduces a structured Lease Renewal feature and optimizes the Lease Doctype UI by consolidating custom action buttons. It addresses the requirement for a controlled, authorized, and audited renewal process while improving the user experience.

Key Changes

  1. UI/UX Consolidation
  • Grouped the following buttons under a new "Actions" dropdown to reduce header clutter:
    • Make Invoice Schedule
    • Generate Pending Invoice
    • Make Invoice Schedule for all Lease
    • Renew Lease (New)
  • Maintained existing report-related buttons under the "View" dropdown.
  • Refactored intro banners to use frm.trigger("custom_set_intro") for a cleaner refresh event.
  1. Lease Renewal Enhancement
  • Trigger: Added a "Renew Lease" button accessible only for leases with Active or Expired status.
  • Confirmation: Integrated frappe.confirm to ensure intentional action before renewal initiation.
  • Validation:
    • Restricted initiation to Property Manager and System Manager roles.
    • Prevents duplicate renewals if a pending renewal already exists.
  • Automation:
    • Automatically clones the existing lease document (excluding previous invoice schedules).
    • Sets the next start_date based on the previous lease's end date and maintains duration.
    • populates Renewed From and Renewal Initiated By fields for full traceability.
  • Audit Trail: Automatically posts a comment to the original lease referencing the newly created draft.
  1. Schema Updates (lease.json)
  • Added Lease Renewal Details section.
  • Added link fields: renewed_from (Lease) and renewal_initiated_by (User).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants