-
-
Notifications
You must be signed in to change notification settings - Fork 537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.0][IMP] product_contract: Allow creating sales orders with lines that lack a contract template #1185
base: 17.0
Are you sure you want to change the base?
Conversation
Hi @sbejaoui, |
948aad5
to
bfe552e
Compare
bfe552e
to
5f16126
Compare
@sbejaoui do you agree? |
…ack a contract template Before this commit, confirming a sales order would raise an exception if any line lacked a configured contract template, preventing the creation of the contract. Now, sales order lines without a contract template are automatically added to a new contract without a template, allowing the process to continue seamlessly.
5f16126
to
5146e47
Compare
rec._prepare_contract_value(self.env["contract.template"]) | ||
) | ||
contracts.append(contract.id) | ||
contract._onchange_contract_type() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something to do on contract side to put a TODO to change automatic_price
on lines to computed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the same? When you put env[model]
, a new recordset is instantiated, so no possible pool sharing between successive calls to this.
Isn't it a bit weird as some wanted values are not populated ? |
Which values? We have only identified the template name. |
@rousseldenis Please provide me with more details; it is not clear. |
Before this commit, confirming a sales order would raise an exception if any line lacked a configured contract template, preventing the creation of the contract.
Now, sales order lines without a contract template are automatically added to a new contract without a template, allowing the process to continue seamlessly.
TT54544
@Tecnativa @pedrobaeza @CarlosRoca13 @sergio-teruel could you please, review this