projects
/
OpenERP
/
semantics.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modification pour utilisation avec le module faq
[OpenERP/semantics.git]
/
topic.py
diff --git
a/topic.py
b/topic.py
index
1ecfa7c
..
6988ce5
100644
(file)
--- a/
topic.py
+++ b/
topic.py
@@
-6,6
+6,17
@@
class Topic(osv.Model):
_name = "semantics.topic"
_name = "semantics.topic"
- columns = {
- "name": fields.char(size="64", string="Title", required=True),
+ _inherit = "mail.thread"
+
+ _columns = {
+ "name": fields.char(string="Title", size=64, required=True),
+ "description": fields.text(string="Description"),
}
}
+
+ _sql_constraints = [
+ (
+ "name_different_from_description_constraint",
+ "CHECK(name <> description)",
+ "Fields name and description should be different",
+ ),
+ ]
\ No newline at end of file