Module
contract
Describe the bug
Whenever I go on a contract.contract form view, for a contract with line recurrence which was already invoiced (last_date_invoiced set), I try to open one line in a modal view, to modify its recurring_next_date and to Save it.
However, upon closing, the recurring_next_date value of the line is reset to the next_period_date_start value.
I'm not exactly sure why it doesn't save the recurring_next_date value on the contract.line record when clicking Save - perhaps since the Edit mode is still on, it doesn't save the value in the database, however it gets overwritten anyways.
To Reproduce
Affected versions: 16.0 (afaik)
Steps to reproduce the behavior:
- Create a
contract.contract entity from a form view
- Check "Line recurrence"
- Create a
contract.line with an arbitrary product
- Set a
date_start before today, to set the next_period_date_start and recurring_next_date fields
- Save and exit
- Click on the newly created
contract.line
- Set the
recurring_next_date to a later date
- Click on
Save
Expected behavior
I would like for the recurring_next_date value to not get overwritten and reset back to the next_period_date_start value
Additional context
I've found various workarounds, however they're not handy for reasons :
-
I can go on a dedicated tab to display the contract.line form view, edit the recurring_next_date value and save, and this value doesn't get overwritten - however, since no web menu allows browsing through contract.line entities, it requires knowing the ID of the contract.line and setting it in the URL bar, which is not handy for functionnal users
-
I can install the contract_update_last_invoice_date module, and set the value through the wizard (since it directly saves on the contract.line record) and quit the modal view without clicking on Save.
However, this is an unstable solution, since modifying the recurring_next_date field directly through the modal view after can reset the recurring_next_date field.
Module
contractDescribe the bug
Whenever I go on a
contract.contractform view, for a contract with line recurrence which was already invoiced (last_date_invoicedset), I try to open one line in a modal view, to modify itsrecurring_next_dateand to Save it.However, upon closing, the
recurring_next_datevalue of the line is reset to thenext_period_date_startvalue.I'm not exactly sure why it doesn't save the
recurring_next_datevalue on thecontract.linerecord when clicking Save - perhaps since the Edit mode is still on, it doesn't save the value in the database, however it gets overwritten anyways.To Reproduce
Affected versions: 16.0 (afaik)
Steps to reproduce the behavior:
contract.contractentity from a form viewcontract.linewith an arbitrary productdate_startbefore today, to set thenext_period_date_startandrecurring_next_datefieldscontract.linerecurring_next_dateto a later dateSaveExpected behavior
I would like for the
recurring_next_datevalue to not get overwritten and reset back to thenext_period_date_startvalueAdditional context
I've found various workarounds, however they're not handy for reasons :
I can go on a dedicated tab to display the
contract.lineform view, edit therecurring_next_datevalue and save, and this value doesn't get overwritten - however, since no web menu allows browsing throughcontract.lineentities, it requires knowing the ID of thecontract.lineand setting it in the URL bar, which is not handy for functionnal usersI can install the
contract_update_last_invoice_datemodule, and set the value through the wizard (since it directly saves on thecontract.linerecord) and quit the modal view without clicking onSave.However, this is an unstable solution, since modifying the
recurring_next_datefield directly through the modal view after can reset therecurring_next_datefield.