-
-
Notifications
You must be signed in to change notification settings - Fork 597
Description
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.contractentity from a form view - Check "Line recurrence"
- Create a
contract.linewith an arbitrary product - Set a
date_startbefore today, to set thenext_period_date_startandrecurring_next_datefields - Save and exit
- Click on the newly created
contract.line - Set the
recurring_next_dateto 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.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 users -
I 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 therecurring_next_datefield directly through the modal view after can reset therecurring_next_datefield.