### Odoo Version - [ ] 16.0 - [ ] 17.0 - [x] 18.0 - [ ] Other (specify) ### Steps to Reproduce - Discounts must be activated - Go to sale order and create a new one. - Select a product and apply a discount. - Save the changes. - Change product quantity and the discount will be setted to 0. https://github.com/user-attachments/assets/d5c868f3-c4f3-4643-8298-2bcb54102147 ### Log Output ```shell ``` ### Support Ticket _No response_ Possible solution: I think that changing this conditional and adding a not before the discount_enabled variable would solve this: https://github.com/odoo/odoo/blob/18.0/addons/sale/models/sale_order_line.py#L732 In v17 this works checking the discount_policy to see if its without discount: https://github.com/odoo/odoo/blob/17.0/addons/sale/models/sale_order_line.py#L577 So i think that makes sense.
Odoo Version
Steps to Reproduce
Grabacion-de-pantalla-desde-2025-05-29-12-20-43.mp4
Log Output
Support Ticket
No response
Possible solution: I think that changing this conditional and adding a not before the discount_enabled variable would solve this:
https://github.com/odoo/odoo/blob/18.0/addons/sale/models/sale_order_line.py#L732
In v17 this works checking the discount_policy to see if its without discount:
https://github.com/odoo/odoo/blob/17.0/addons/sale/models/sale_order_line.py#L577
So i think that makes sense.