[FIX] pad: revert part of previous fix because it could produce problems in some cases
bzr revid: nicolas.vanhoren@openerp.com-20130419144238-0hq1rgmcacw5sw1r
This commit is contained in:
parent
ea2544e432
commit
1f2064cb93
|
@ -84,15 +84,10 @@ class pad_common(osv.osv_memory):
|
|||
|
||||
# Set the pad content in vals
|
||||
def _set_pad_value(self, cr, uid, vals, context=None):
|
||||
for k in self._all_columns.keys():
|
||||
for k,v in vals.items():
|
||||
field = self._all_columns[k].column
|
||||
if hasattr(field,'pad_content_field'):
|
||||
url = vals.get(k)
|
||||
if not url and ("id" in vals):
|
||||
url = self.read(cr, uid, vals["id"], [k], context=context)[k]
|
||||
if url:
|
||||
vals[field.pad_content_field] = self.pad_get_content(cr, uid, url, context=context)
|
||||
|
||||
vals[field.pad_content_field] = self.pad_get_content(cr, uid, v, context=context)
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if not default:
|
||||
|
|
Loading…
Reference in New Issue