Skip to content
Snippets Groups Projects
Commit dde30798 authored by Dawn Hwang's avatar Dawn Hwang
Browse files

[FIX] sale_timesheet: Check for so_line before unlinking invoice lines


Steps to reproduce:
 1. Create an SO with billable timesheet entries
 2. Create an invoice
 3. If using enterprise, first cancel the invoice and reset the timesheet
  entries back to draft, then set the invoice back to draft
 4. Remove the sale order items from the timesheet entries
 5. Remove the invoice line associated with the timesheet entries

Current behavior:
 - Throws an error since the so_line value from read_group is now
   False and is not subscriptable

Expected behavior:
 - Removes the invoice lines

Fix:
 - Check that the so_line is not False before continuing with the logic

closes odoo/odoo#133748

Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
parent 07b08a2d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment