[16.0][FIX] contract_forecast: Removed default values from related fields in res.config.settings#1434
Open
Honeyxilia wants to merge 1 commit into
Conversation
…n res.config.settings Opening the Configuration menu instanciates a new res.config.settings object, then applies the assigned values to revelant fields once we use the Save action. The related field on these fields are intended to fetch the company values, then to apply the saved values to the related field afterwards. However, the assignment of default values on these fields means that, when creating a new res.config.settings instance, these default values are used, and then inversely applied to the related fields, meaning that if we are to use the Save action (which can happen if we quit the view), the default values always override the company values, unless we always go out of our way to the Invoicing tab and set the contract_forecast values to the desired values. As such, we remove these default attributes, so that the res.config.settings instance doesn't override the company values whenever we open the Configuration menu.
maisim
approved these changes
May 20, 2026
maisim
left a comment
There was a problem hiding this comment.
Defaults already are on res.company :
https://github.com/OCA/contract/blob/16.0/contract_forecast/models/res_company.py#L10-L18
So removing them from the res.config.settings sound good. Existing company values are preserved.
legalsylvain
approved these changes
May 20, 2026
fcayre
approved these changes
May 21, 2026
remi-filament
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opening the Settings menu instanciates a new res.config.settings object, then applies the assigned values to revelant fields once we use the Save action.
The related field on these fields are intended to fetch the company values, then to apply the saved values to the related field afterwards. However, the assignment of default values on these fields means that, when creating a new res.config.settings instance, these default values are used, and then inversely applied to the related fields, meaning that if we are to use the Save action (which can happen if we quit the view), the default values always override the company values, unless we always go out of our way to the Invoicing tab and set the contract_forecast values to the desired values.
As such, we remove these default attributes, so that the res.config.settings instance doesn't override the company values whenever we open the Settings menu.
Steps to reproduce the bug:
contract_forecastinstalled.