diff options
| author | Martin Trigaux <mat@odoo.com> | 2017-07-14 10:37:09 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2017-07-14 10:45:16 +0200 |
| commit | 1d3d665f2c60f9cdce78b1c6198a83c954085a2e (patch) | |
| tree | 5dc7dc13ad0e2db42f102d20e847d597ce1c273e /doc/howtos/backend/exercise-state-basic | |
| parent | 29c516536154b6c26e560558a44e73cc41f991b3 (diff) | |
[FIX] doc: adapt to removal of workflows
Remove one excerice that was in the workflow section
Adapt the diff
Diffstat (limited to 'doc/howtos/backend/exercise-state-basic')
| -rw-r--r-- | doc/howtos/backend/exercise-state-basic | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/doc/howtos/backend/exercise-state-basic b/doc/howtos/backend/exercise-state-basic deleted file mode 100644 index f70a41b4dae..00000000000 --- a/doc/howtos/backend/exercise-state-basic +++ /dev/null @@ -1,55 +0,0 @@ -# HG changeset patch -# Parent 8c721171aa16a41e94059f53d6780c67b5ef2dfc -# Parent 8d2ca42b5be2031ea9624896df53f09f7ca131be - -diff --git a/openacademy/models.py b/openacademy/models.py ---- a/openacademy/models.py -+++ b/openacademy/models.py -@@ -66,6 +66,24 @@ class Session(models.Model): - attendees_count = fields.Integer( - string="Attendees count", compute='_get_attendees_count', store=True) - -+ state = fields.Selection([ -+ ('draft', "Draft"), -+ ('confirmed', "Confirmed"), -+ ('done', "Done"), -+ ], default='draft') -+ -+ @api.multi -+ def action_draft(self): -+ self.state = 'draft' -+ -+ @api.multi -+ def action_confirm(self): -+ self.state = 'confirmed' -+ -+ @api.multi -+ def action_done(self): -+ self.state = 'done' -+ - @api.depends('seats', 'attendee_ids') - def _taken_seats(self): - for r in self: -diff --git a/openacademy/views/openacademy.xml b/openacademy/views/openacademy.xml ---- a/openacademy/views/openacademy.xml -+++ b/openacademy/views/openacademy.xml -@@ -96,6 +96,19 @@ - <field name="model">openacademy.session</field> - <field name="arch" type="xml"> - <form string="Session Form"> -+ <header> -+ <button name="action_draft" type="object" -+ string="Reset to draft" -+ states="confirmed,done"/> -+ <button name="action_confirm" type="object" -+ string="Confirm" states="draft" -+ class="oe_highlight"/> -+ <button name="action_done" type="object" -+ string="Mark as done" states="confirmed" -+ class="oe_highlight"/> -+ <field name="state" widget="statusbar"/> -+ </header> -+ - <sheet> - <group> - <group string="General"> |
