Community mailing list archives

Re: automated action to cancel invoices created on sundays

Mohamed Hagag
- 06/23/2015 20:39:53

anyone got this question ?!

On 05/29/2015 02:22 AM, Mohamed M. Hagag wrote:
<blockquote cite="" type="cite">


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 .