diff options
| author | Jérome Maes <jem@openerp.com> | 2016-08-04 09:17:35 +0200 |
|---|---|---|
| committer | Jérome Maes <jem@openerp.com> | 2016-08-04 12:02:14 +0200 |
| commit | 9f6ecb239ef82e34dc774e20a1c38ae290e862a9 (patch) | |
| tree | 855eaecd37330cc10cc466af517695630e388e69 /addons/website_livechat/models | |
| parent | 8a399930f316fc4d65828441d86301d4a8dfa669 (diff) | |
[REF] website_*: clean method to override when using
Diffstat (limited to 'addons/website_livechat/models')
| -rw-r--r-- | addons/website_livechat/models/im_livechat.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/addons/website_livechat/models/im_livechat.py b/addons/website_livechat/models/im_livechat.py index 5cc7296e0a9..517cd0b544f 100644 --- a/addons/website_livechat/models/im_livechat.py +++ b/addons/website_livechat/models/im_livechat.py @@ -9,12 +9,10 @@ class ImLivechatChannel(models.Model): _name = 'im_livechat.channel' _inherit = ['im_livechat.channel', 'website.published.mixin'] - @api.v7 - # TODO : when mixin in new api.v8, change this ! - def _website_url(self, cr, uid, ids, field_name, arg, context=None): - res = super(ImLivechatChannel, self)._website_url(cr, uid, ids, field_name, arg, context=context) - for channel in self.browse(cr, uid, ids, context=context): - res[channel.id] = "/livechat/channel/%s" % (slug(channel),) - return res + @api.multi + def _compute_website_url(self): + super(ImLivechatChannel, self)._compute_website_url() + for channel in self: + channel.website_url = "/livechat/channel/%s" % (slug(channel),) website_description = fields.Html("Website description", default=False, help="Description of the channel displayed on the website page", sanitize=False, translate=html_translate) |
