From ef41e920006142e96f2d8b8a3cec3400d52ed780 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Mon, 12 Oct 2020 19:24:42 +0200 Subject: [PATCH] Add start and stop buttons on works issue9418 review317661005 --- CHANGELOG | 2 ++ tests/scenario_production_work.rst | 15 +++++------ view/work_form.xml | 6 ++++- work.py | 42 ++++++++++++++++++++++++++++++ work.xml | 12 +++++++++ 5 files changed, 68 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b7f9b1b326..7f3edb7297 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Add start and stop buttons on works + Version 5.6.0 - 2020-05-04 * Bug fixes (see mercurial logs for details) * Make work center not required on request and draft states diff --git a/tests/scenario_production_work.rst b/tests/scenario_production_work.rst index ae85cabbb0..6d188aa376 100644 --- a/tests/scenario_production_work.rst +++ b/tests/scenario_production_work.rst @@ -214,17 +214,16 @@ Run works:: >>> work2.reload() >>> work2.state 'draft' - >>> cycle2 = work2.cycles.new() - >>> cycle2.click('run') - >>> cycle2.state - 'running' + >>> work2.click('start') + >>> cycle2, = [c for c in work2.active_cycles] >>> cycle2.duration = datetime.timedelta(hours=1) - >>> cycle2.click('do') - >>> cycle2.state - 'done' - >>> work2.reload() + >>> cycle2.save() + >>> work2.click('stop') >>> work2.state 'finished' + >>> cycle2.reload() + >>> cycle2.state + 'done' Add an extra work:: diff --git a/view/work_form.xml b/view/work_form.xml index 70db0e226d..3fe5289592 100644 --- a/view/work_form.xml +++ b/view/work_form.xml @@ -12,7 +12,11 @@ this repository contains the full copyright notices and license terms. -->