projects
/
OpenERP
/
todolist.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Ajout contrainte pour topic : name <> description
[OpenERP/todolist.git]
/
todolist.py
diff --git
a/todolist.py
b/todolist.py
index
cc15f7f
..
a25878f
100644
(file)
--- a/
todolist.py
+++ b/
todolist.py
@@
-206,3
+206,12
@@
class Topic(osv.Model):
_defaults = {
"activated": "Active",
}
+
+
+ _sql_constraints = [
+ (
+ "name_different_from_description_constraint",
+ "CHECK(name <> description)",
+ "Fields name and description should be different",
+ ),
+ ]