Tips and Tricks (internal only)

Welcome!

This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

Boekingen verwijderen

Avatar
Negeren
1 Antwoord
0
Beste antwoord

Server Actie: 


Op model: account.move

for r in records:
  if r.state == 'cancel':
    r.with_context({'force_delete': True}).unlink()


Indien je meerdere tegelijk wenst te verwijderen (hanteer dan onderstaande code):

Let op! deze onderstaande code toetst niet of boeking in 'cancel' is!


items = env.context.get('active_ids')
for item in items:
  env['account.move'].search([('id', '=', item)]).with_context({'force_delete': True}).unlink()
Avatar
Negeren