Daily updates from Odoo
Friday, June 28, 2024
1 change
Resolved issues and error corrections
This fix resolves two critical errors that occurred when importing Winbooks data with missing or incomplete information. The system now properly handles missing fields by using default values instead of crashing, allowing imports to complete successfully even when certain data fields are absent from the source file.
Original PR description
Steps:
- import a winbooks with data
1: DOCORDER != VAT and journal not in ('asset_receivable', 'liability_payable')
2: without "AMOUNTEUR"
Actual result:
- 1 KeyError traceback for "display_type"
- 2 TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
Expected result
- No KeyError, default value is "product" (cf compute)
https://github.com/odoo/odoo/blob/9389095d160a03117f815dacebf591d842c81d1d/addons/account/models/account_move_line.py#L433
- AMOUNTEUR is 0 for calculation if not there
Caused by:
1 https://github.com/odoo/enterprise/commit/b9d4ce816fb926b6c0e7a71cd572c8a1c4134155 2 https://github.com/odoo/enterprise/commit/198ecca82cf61b14f42686e8b051568bda034ce9
opw-3996117
Forward-Port-Of: odoo/enterprise#65159