diff options
| author | Victor Feyens <vfe@odoo.com> | 2021-04-30 13:24:57 +0000 |
|---|---|---|
| committer | Antoine Vandevenne (anv) <anv@odoo.com> | 2021-05-04 08:09:20 +0000 |
| commit | 27bad8c3e32049ec69a588df0558e57a0b928309 (patch) | |
| tree | b60e430163d486c8c1fd052738c9854aeb8300f5 /doc/howtos/backend/exercise-constraint-python | |
| parent | 75a122bbae3a32bfa79da3506179fc63a8bced5d (diff) | |
[MOV] doc: move documentation to a dedicated repository
In odoo/documentation-user#945, the developer documentation is merged
with the user documentation in a single repository and build config.
This commit then removes source files for the developer documentation
from the odoo/odoo repository.
DOC PR: https://github.com/odoo/documentation-user/pull/945
task-2351938
task-2352371
task-2205684
task-2352544
Co-authored-by: Victor Feyens <vfe@odoo.com>
Co-authored-by: Antoine Vandevenne <anv@odoo.com>
Diffstat (limited to 'doc/howtos/backend/exercise-constraint-python')
| -rw-r--r-- | doc/howtos/backend/exercise-constraint-python | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/doc/howtos/backend/exercise-constraint-python b/doc/howtos/backend/exercise-constraint-python deleted file mode 100644 index 248507a241f..00000000000 --- a/doc/howtos/backend/exercise-constraint-python +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# Parent 7a7d003fe38426a405ce0657a627a139133ec4dd -# Parent 52f54b46487c8224a5aade4b921be77360ed3eae - -diff --git a/openacademy/models.py b/openacademy/models.py ---- a/openacademy/models.py -+++ b/openacademy/models.py -@@ -1,6 +1,6 @@ - # -*- coding: utf-8 -*- - --from odoo import models, fields, api -+from odoo import models, fields, api, exceptions - - class Course(models.Model): - _name = 'openacademy.course' -@@ -58,3 +58,9 @@ class Session(models.Model): - 'message': "Increase seats or remove excess attendees", - }, - } -+ -+ @api.constrains('instructor_id', 'attendee_ids') -+ def _check_instructor_not_in_attendees(self): -+ for r in self: -+ if r.instructor_id and r.instructor_id in r.attendee_ids: -+ raise exceptions.ValidationError("A session's instructor can't be an attendee") |
