Saturday, January 11, 2025
1 change · 17.0
Miscellaneous changes
Before this PR: - The `AccountMove.search` method was called without checking if `invoice_number` was valid. - This could lead to unexpected errors when `invoice_number` was `False`. After this PR: - Added a check to ensure the search is only performed if `invoice_number` is valid. - If `invoice_number` is `False`, it falls back to an empty `AccountMove` recordset. - Ensures smoother iteration over `moves` and prevents unnecessary errors in the GSTR-1 error handling logic. Forward-Port
Original PR description
Before this PR: - The `AccountMove.search` method was called without checking if `invoice_number` was valid. - This could lead to unexpected errors when `invoice_number` was `False`. After this PR: - Added a check to ensure the search is only performed if `invoice_number` is valid. - If `invoice_number` is `False`, it falls back to an empty `AccountMove` recordset. - Ensures smoother iteration over `moves` and prevents unnecessary errors in the GSTR-1 error handling logic. Forward-Port-Of: odoo/enterprise#76870