Hi,
I have the problem, that I can't select anything from my own object 'thingtpl'.
As you can see my object has only one field: 'thing_no'.
I get the error message that there's no field called 'name'
How can I tell the system, that it should search for the field 'thing_no'?
It is interessting, that if I use another relation it will work fine.
e.g with account.account, product.product, res.partner etc
thanx for your help
Code:
import wizard
import pooler
class wiz_create_thing(wizard.interface):
_transaction_form = '''<xml>
<form>
<field>
</form>'''
_transaction_fields = {
'thing_no': {'string': 'Thing No',
'type': 'many2one',
'relation': 'thingtpl',
'required': True },
}
def _thing_create(self, cr, uid, data, context):
return {}
states = {
'init': {
'actions': [_get_defaults],
'result': {'type': 'form',
'arch':_transaction_form,
'fields':_transaction_fields,
'state':[('end', 'Cancel', 'gtk-cancel'),('thing_copy', 'Make new thing', 'gtk-new')]}
},
'thing_copy': {
'actions': [],
'result': {'type': 'state',
'state':'end'}
}
}
wiz_create_thing('wizard_create_thing')