I tried cancelling timesheet. I could not delete it as well, since it is linked with sales invoice. I tried replicating this errors on other projects and invoices… It works fine… only on this project i get this message.
I experienced this with old sales invoices that were done using the time log batch method, that were then changed to time sheets via patch when v7 came along. They are linked to each other and disallow cancellation of either
Hi,
Do you need the timesheet linked with sales invoices?.
If you don’t you can avoid the action by commenting the lines self.update_timesheet_billing_for_project() AND self.update_time_sheet(self.name) in sales_invoice.py
Regarding the canceling of this especific invoice you need to ignore_links adding (self.flags.ignore_links = True) On def before_cancel(self) AND def on_cancel(self) in sales_invoice.py . This will ignore ALL links so I recommend to remove it after canceling the invoice