Repository navigation
feat: Subscription renewal customizations across Quotation, Sales Order, and Sales Invoice - #80
Conversation
Irfan778899
commented
Aug 27, 2026
- Add Subscription Details section with Subscription Type, Is New Subscription, Subscription Remarks, and Subscription Item child table to Quotation, Sales Order, and Sales Invoice
- Add dynamic Old Invoice / Old Proforma Invoice link based on Export checkbox
- Enforce mandatory Subscription Type and conditional Old Invoice requirement
- Configure read-only controls for Old Invoice and Export on Sales Order and Sales Invoice
- Update renewal workflow to mark old document renewed on export Sales Order or domestic Sales Invoice submission
- Add client scripts for item filtering and amount syncing
1. Critical Bugs & Correctness IssuesA. Broken string interpolation in
|
| Priority | File(s) | Action |
|---|---|---|
| High (Blocker) | custom_field.json |
Fix deadlock where custom_old_invoice is read_only: 1 while also having mandatory_depends_on on Sales Order and Sales Invoice (breaks standalone SO/SI creation). |
| High (Blocker) | custom_field.json |
Add "default": "None" to custom_subscription_type (or relax reqd: 1) so programmatic/mapped SO & SI creation doesn't crash with MandatoryError. |
| High | quotation.js, sales_order.js |
Fix "Item 0 is not present..." → "Item {0} is not present...". |
| High | custom_field.json |
Set "no_copy": 1 on Sales Order-custom_renewed and Sales Invoice-custom_renewed so duplicating/amending doesn't copy the renewed flag. |
| Medium | quotation.js, sales_order.js, sales_invoice.js |
Add set_query on custom_old_invoice to filter by docstatus: 1, customer: frm.doc.customer, and custom_renewed: 0. |
| Medium | quotation.js, sales_order.js, sales_invoice.js |
Prevent update_old_invoice_link from calling frm.set_value when frm.doc.docstatus !== 0 (prevents marking submitted docs as dirty on load). |
| Medium | quotation.py, sales_order.py, sales_invoice.py |
Move Subscription Item amount syncing & date/item validation (from_date <= to_date) to Python validate hook, and deduplicate across the 3 files. |
bb6191c to
3164fce
Compare
|
The PR is updated with these changes |
What Was Fixed Well
Remaining Issues Found (Including 2 Regressions Introduced by the Fixes)1. Critical Regression:
|
3164fce to
e82e6a6
Compare
|
Updated the PR |
…er, and Sales Invoice - Add Subscription Details section with Subscription Type, Is New Subscription, Subscription Remarks, and Subscription Item child table to Quotation, Sales Order, and Sales Invoice - Add dynamic Old Invoice / Old Proforma Invoice link based on Export checkbox - Enforce mandatory Subscription Type and conditional Old Invoice requirement - Configure read-only controls for Old Invoice and Export on Sales Order and Sales Invoice - Update renewal workflow to mark old document renewed on export Sales Order or domestic Sales Invoice submission - Add client scripts for item filtering and amount syncing
e82e6a6 to
e63dfe4
Compare