Files
odoo_source/addons/web/static/tests
Hubert Van de Walle (huvw) 5023e1a52c [FIX] web: commitChanges with a field input removed during an update
Steps to reproduce
==================

- Go to Payroll > Payslips > All Payslips
- Click on any line
- Click on the cog > Edit Payslip Lines
- Change an amount
- Press Tab

```
Cannot read properties of null (reading 'value')
    at commitChanges (/web/static/src/views/fields/input_field_hook.js:163)
    ...
```

Cause of the issue
==================

A custom Field is used: PayslipLineField.
It is used to override the record.update to trigger an action.
https://github.com/odoo/enterprise/blob/f8c027685a49fca519fd6ac2f41dd5f30b243934/hr_payroll/static/src/js/payslip_line_one2many.js#L63-L80

This causes the view to be destroyed -> `inputRef.el` becomes undefined.

Solution
========

Use the field value before the update.

opw-3434835

closes odoo/odoo#131971

X-original-commit: 546978c70f5bee59b9985246977585ef59d761cd
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-08-16 14:21:50 +02:00
..
2023-07-24 20:17:50 +02:00
…