From 519c51615e1d6f99141e603d7919de2ec6be0946 Mon Sep 17 00:00:00 2001 From: Alicia FLOREZ Date: Wed, 29 May 2013 10:38:26 +0200 Subject: [PATCH] Modification pour utilisation avec le module faq --- __openerp__.py | 2 +- topic.py | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/__openerp__.py b/__openerp__.py index 2c0d97f..e2a6623 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -1,7 +1,7 @@ { "name": "Semantics", "version": "1.0", - "depends": ["base"], + "depends": ["base", 'mail'], "author": "Alicia FLOREZ & Sébastien CHAZALLET", "category": "Tools", "description": """Regrouep un ensemble d'outils.""", diff --git a/topic.py b/topic.py index 1ecfa7c..6988ce5 100644 --- a/topic.py +++ b/topic.py @@ -6,6 +6,17 @@ class Topic(osv.Model): _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 -- 1.7.10.4