flectra/addons/website_partner/models/res_partner.py
flectra-admin 769eafb483 [INIT] Inception of Flectra from Odoo
Flectra is Forked from Odoo v11 commit : (6135e82d73)
2018-01-16 11:45:59 +05:30

19 lines
650 B
Python

# -*- coding: utf-8 -*-
from odoo import api, fields, models
from odoo.addons.http_routing.models.ir_http import slug
class WebsiteResPartner(models.Model):
_name = 'res.partner'
_inherit = ['res.partner', 'website.seo.metadata', 'website.published.mixin']
website_description = fields.Html('Website Partner Full Description', strip_style=True)
website_short_description = fields.Text('Website Partner Short Description')
@api.multi
def _compute_website_url(self):
super(WebsiteResPartner, self)._compute_website_url()
for partner in self:
partner.website_url = "/partners/%s" % slug(partner)