Files
odoo_source/addons/website_partner/models/res_partner.py
T
Thibault Delavallée 81b0266ac3 [REF] website_google_map, website_crm, website_crm_partner_assign, website_membership: extracted res.partner model stuff into dedicated module and moved model-related stuff inside a models directory.
Website related fields on res.partner are now located inside their own module, in website_partner.
This module is a dependency for other modules that previously (re)defined various website fields.

Next step is to refactor a bit those modules, but one thing at a time. All glory to the hypnotoad.

bzr revid: tde@openerp.com-20131002092309-jlov4j1v6s9r6jyk
2013-10-02 11:23:09 +02:00

22 lines
617 B
Python

# -*- coding: utf-8 -*-
from openerp.osv import osv, fields
class WebsiteResPartner(osv.Model):
_inherit = 'res.partner'
_columns = {
'website_published': fields.boolean(
'Publish', help="Publish on the website"),
'website_description': fields.html(
'Website Partner Full Description'
),
'website_short_description': fields.text(
'Website artner Short Description'
),
}
def img(self, cr, uid, ids, field='image_small', context=None):
return "/website/image?model=%s&field=%s&id=%s" % (self._name, field, ids[0])