summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2015-01-15 15:37:16 +0100
committerMartin Trigaux <mat@odoo.com>2015-01-15 15:37:31 +0100
commitfc9ce0bcff3f211dbb722a09a65af2a364c25acf (patch)
tree5286cec11da76b6a23fa2a43facc6e190bf924c2
parent8351c6c5edfa8327eda3169548f67c1b9c72a1b8 (diff)
[FIX] website_forum: description not translated
Make the field description on a forum translatable and add it in the forum view. opw 619786
-rw-r--r--addons/web/static/src/js/openerpframework.js6
-rw-r--r--addons/website_forum/models/forum.py2
-rw-r--r--addons/website_forum/views/forum.xml1
3 files changed, 8 insertions, 1 deletions
diff --git a/addons/web/static/src/js/openerpframework.js b/addons/web/static/src/js/openerpframework.js
index 007edae7220..8b674afb0f0 100644
--- a/addons/web/static/src/js/openerpframework.js
+++ b/addons/web/static/src/js/openerpframework.js
@@ -1272,6 +1272,9 @@ openerp.TranslationDataBase = openerp.Class.extend(/** @lends instance.Translati
add_module_translation: function(mod) {
var self = this;
_.each(mod.messages, function(message) {
+ if (message.id === 'Create a product') {
+ debugger;
+ }
self.db[message.id] = message.string;
});
},
@@ -1285,6 +1288,9 @@ openerp.TranslationDataBase = openerp.Class.extend(/** @lends instance.Translati
return fcnt;
},
get: function(key) {
+ if (key === 'Create a product') {
+ debugger;
+ }
return this.db[key];
},
/**
diff --git a/addons/website_forum/models/forum.py b/addons/website_forum/models/forum.py
index 95343de4af6..1d984edc409 100644
--- a/addons/website_forum/models/forum.py
+++ b/addons/website_forum/models/forum.py
@@ -37,7 +37,7 @@ class Forum(osv.Model):
_columns = {
'name': fields.char('Name', required=True, translate=True),
'faq': fields.html('Guidelines'),
- 'description': fields.html('Description'),
+ 'description': fields.html('Description', translate=True),
# karma generation
'karma_gen_question_new': fields.integer('Asking a question'),
'karma_gen_question_upvote': fields.integer('Question upvoted'),
diff --git a/addons/website_forum/views/forum.xml b/addons/website_forum/views/forum.xml
index d0bb3e13e3d..1bde99ff143 100644
--- a/addons/website_forum/views/forum.xml
+++ b/addons/website_forum/views/forum.xml
@@ -24,6 +24,7 @@
<sheet>
<group>
<field name="name"/>
+ <field name="description"/>
</group>
<notebook>
<page string='Karma Gains'>