projects
/
OpenERP
/
todolist.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be8b93d
)
Ajout contrainte pour topic : name <> description
author
Alicia FLOREZ
<alicflorez@gmail.com>
Thu, 21 Mar 2013 16:22:51 +0000
(17:22 +0100)
committer
Alicia FLOREZ
<alicflorez@gmail.com>
Thu, 21 Mar 2013 16:22:51 +0000
(17:22 +0100)
todolist.py
patch
|
blob
|
history
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",
+ ),
+ ]