[FIX]website_partner:partner description is now translatable

Steps to reproduce:
-install website, website_partner, contacts and studio
-go to contacts and open any partner
-click the studio icon (top-right corner of the screen)
-add the 'website_description' field to the partner

Previous behavior:
the description field is not translatable and attempting to
change the "translatable" option in technical > fields spawns
an error

Current behavior:
the description field is translatable

opw-2155115

closes odoo/odoo#42043

X-original-commit: 186b599246321465eae937b875b6c970656b145a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit is contained in:
jerome hanke (jhk)
2019-12-17 10:30:57 +00:00
parent 4e536a4ac0
commit 767f25cc4e
+2 -1
View File
@@ -2,13 +2,14 @@
from odoo import api, fields, models
from odoo.addons.http_routing.models.ir_http import slug
from odoo.tools.translate import html_translate
class WebsiteResPartner(models.Model):
_name = 'res.partner'
_inherit = ['res.partner', 'website.seo.metadata']
website_description = fields.Html('Website Partner Full Description', strip_style=True)
website_description = fields.Html('Website Partner Full Description', strip_style=True, translate=html_translate)
website_short_description = fields.Text('Website Partner Short Description')
def _compute_website_url(self):