Sat, 16 Jul 2016 22:31:46 +0700 Cédric Krier <[email protected]>:
>On 2016-07-16 17:22, 'Udo Spallek' via tryton wrote:
>> File "/ado/src/trytond/trytond/model/fields/field.py", line 142, in
>> __init__
>> assert string, 'a string is required'
>> AssertionError: a string is required
>
>You have forgotten to define a string/label for each field.
>
Ouch, I need new glasses…
The following code works for me::
class Content(ModelSQL, ModelView):
__name__ = 'content'
original_data = fields.Many2One(
'ir.attachment', 'Original Data',
domain=[('resource', '=', (__name__, Eval('id')))],
states={'readonly': Eval('id', 0) < 1}, depends=['id'])
Thanks a lot.
Best Udo
--
You received this message because you are subscribed to the Google Groups
"tryton" group.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tryton/20160718122040.6e8d3d74%40bender.dsl.
pgpUu0onI7wxZ.pgp
Description: Digitale Signatur von OpenPGP
