[FIX] website: prevent editing contact address with qweb contact widget
authorDenis Ledoux <dle@odoo.com>
Thu, 16 Oct 2014 16:38:20 +0000 (18:38 +0200)
committerDenis Ledoux <dle@odoo.com>
Thu, 16 Oct 2014 16:39:37 +0000 (18:39 +0200)
Because, currently, it copy the whole address in the contact name. The address is therefore duplicated

addons/website/models/ir_qweb.py

index c598773..f0a75dc 100644 (file)
@@ -417,6 +417,9 @@ class Contact(orm.AbstractModel):
     _name = 'website.qweb.field.contact'
     _inherit = ['ir.qweb.field.contact', 'website.qweb.field.many2one']
 
+    def from_html(self, cr, uid, model, column, element, context=None):
+        return None
+
 class QwebView(orm.AbstractModel):
     _name = 'website.qweb.field.qweb'
     _inherit = ['ir.qweb.field.qweb']