_columns = {
'name': fields.char('Name', size=128, required=True, select=True),
'date': fields.date('Date', select=1),
+ 'sale_ids': fields.one2many('sale.order', 'partner_id', 'Sales'),
'title': fields.selection(_partner_title_get, 'Title', size=32),
'parent_id': fields.many2one('res.partner','Main Company', select=2),
'child_ids': fields.one2many('res.partner', 'parent_id', 'Partner Ref.'),
<field name="lang" select="2"/>
<field name="supplier" select="2"/>
</group>
+ <field name="sale_ids" colspan="4"/>
<notebook colspan="4">
<page string="General">
<field colspan="4" mode="form,tree" name="address" nolabel="1" select="1">
result += self.localcontext.get('translate', lambda x:x)(sps.pop(0))
if sps:
try:
- txt2 = str2xml(eval(sps.pop(0),self.localcontext))
+ txt = eval(sps.pop(0),self.localcontext)
except:
- txt2 = ''
- if type(txt2)==type('') or type(txt2)==type(u''):
+ pass
+ if type(txt)==type('') or type(txt)==type(u''):
+ txt2 = str2xml(txt)
result += txt2
- elif (txt2 is not None) and (txt2 is not False):
- result += str(txt2)
+ elif (txt is not None) and (txt is not False):
+ result += str(txt)
return result
def text_get(node):