mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] does not need to check if there is ids before calling unlink, it will return early
This commit is contained in:
@@ -47,9 +47,8 @@ class AccountInvoice(orm.Model):
|
||||
[('invoice_id', '=', invoice_id),
|
||||
('state', '=', 'draft')],
|
||||
context=context)
|
||||
if cc_draft_line_ids:
|
||||
cc_line_obj.unlink(cr, uid,
|
||||
cc_draft_line_ids,
|
||||
context=context)
|
||||
cc_line_obj.unlink(cr, uid,
|
||||
cc_draft_line_ids,
|
||||
context=context)
|
||||
return super(AccountInvoice, self).action_cancel(cr, uid, ids,
|
||||
context=context)
|
||||
|
||||
Reference in New Issue
Block a user