add button 'execute booking now'

This commit is contained in:
=Frederik Jaeckel 2024-09-28 18:30:43 +02:00
parent 181f7405d6
commit 321aeb827d
6 changed files with 69 additions and 3 deletions

View file

@ -388,6 +388,23 @@ class PlannerTestCase(object):
'setpos': 5, 'monthday': None, 'weekday': '2',
'end_date': None}])
@with_transaction()
def test_planner_run_booking_now(self):
""" create job, press button 'booknow'
"""
Planner = Pool().get('cashbook.planner')
job = self.prep_create_job()
self.assertEqual(
job.rec_name, "Job 1|Book 1|Exp|Cat1|05/01/2022|usd0.00")
self.assertEqual(
job._compute_dates_by_rrule(
count=1, query_date=date(2022, 5, 1)), [
date(2022, 5, 1)])
Planner.booknow([job])
self.assertEqual(
job.rec_name, "Job 1|Book 1|Exp|Cat1|06/01/2022|usd0.00")
@with_transaction()
def test_planner_create_update_nextrun(self):
""" create job, check nextrun-record