Search cron by method name

issue8201
This commit is contained in:
Cédric Krier
2019-04-12 16:48:49 +02:00
parent ffffb8296f
commit cfd474c829
+2 -4
View File
@@ -164,8 +164,7 @@ Run cron::
>>> Cron = Model.get('ir.cron')
>>> cron_customer_create, = Cron.find([
... ('model', '=', 'account.payment.stripe.customer'),
... ('function', '=', 'stripe_create'),
... ('method', '=', 'account.payment.stripe.customer|stripe_create'),
... ])
>>> cron_customer_create.companies.append(Company(company.id))
>>> cron_customer_create.click('run_once')
@@ -201,8 +200,7 @@ Delete customer::
Run cron::
>>> cron_customer_delete, = Cron.find([
... ('model', '=', 'account.payment.stripe.customer'),
... ('function', '=', 'stripe_delete'),
... ('method', '=', 'account.payment.stripe.customer|stripe_delete'),
... ])
>>> cron_customer_delete.companies.append(Company(company.id))
>>> cron_customer_delete.click('run_once')