mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-28 09:32:06 +02:00
19.0 vanilla
This commit is contained in:
parent
79f83631d5
commit
73afc09215
6267 changed files with 1534193 additions and 1130106 deletions
|
|
@ -0,0 +1,15 @@
|
|||
from odoo import models
|
||||
|
||||
|
||||
class AccountMoveReversal(models.TransientModel):
|
||||
_inherit = 'account.move.reversal'
|
||||
|
||||
def reverse_moves(self, is_modify=False):
|
||||
if is_modify:
|
||||
moves = self.move_ids.filtered(lambda m: m.move_type == 'out_invoice')
|
||||
timesheets_sudo = self.env['account.analytic.line'].sudo().search([
|
||||
('timesheet_invoice_id', 'in', moves.ids),
|
||||
])
|
||||
if timesheets_sudo:
|
||||
timesheets_sudo.write({'timesheet_invoice_id': False})
|
||||
return super().reverse_moves(is_modify)
|
||||
Loading…
Add table
Add a link
Reference in a new issue