[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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user