Community mailing list archives
automated action to cancel invoices created on sundaysby
How can I create an automated action or server action to cancel recurring invoices created on sundays ?
I already tried this domain filter
[[time.strftime('%A',time.strptime(date_invoice,'%Y-%m-%d')), '=', 'Friday']]
but I get JS error that strptime is not definded.
also I tried this code in a server action
time.strftime('%A',time.strptime(date_invoice,'%Y-%m-%d'))='Friday' and workflow.model.cancel_invoice()
but I get another error .