Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] sale_timesheet: set
is_so_line_edited
when clearing so_line
Versions: --------- - 16.0+ Steps to reproduce: ------------------- 1. In Timesheets, add a new line; 2. link it to a Sale Order project; 3. make it non-billable by clearing the Sale Order Item field; 4. select related project in Project / Configuration / Projects; 5. in Invoicing tab, add yourself and a Sales Order Item, then save; 6. go back to Timesheets; 7. check the Sales Order Item field of the timesheet you created. Issue: ------ Sales Order Item was changed automatically, this shouldn't happen after a manual change. Cause: ------ The `so_line_field` widget used the `this.changeOnEmpty` attribute to check whether `is_so_line_edited` should be set, but this was removed in 1ecdbfc, hence the field will never be set when clearing the `so_field` value. Solution: --------- On a field change, compare the previous ID of `so_line` with the new ID, and set `is_so_line_edited` to `true` if they're different. Related: -------- odoo/enterprise#52544 opw-3547725 closes odoo#146062 X-original-commit: bc1ad08 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com> Signed-off-by: Levi Siuzdak <sile@odoo.com>
- Loading branch information