Advertisement
Guest User

Untitled

a guest
Jul 16th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. class Content(ModelSQL, ModelView):
  2. __name__ = 'content'
  3. original_data = fields.Many2One(
  4. 'ir.attachment', domain=[('resource', '=', ('content', Eval('id')))])
  5. original_data = fields.Many2One(
  6. 'ir.attachment', domain=[('resource', '=', (__name__, Eval('id')))])
  7.  
  8. Both raises the following error:
  9.  
  10. Traceback (most recent call last):
  11. File "/usr/local/bin/trytond", line 6, in <module>
  12. exec(compile(open(__file__).read(), __file__, 'exec'))
  13. File "/ado/src/trytond/bin/trytond", line 80, in <module>
  14. trytond.server.TrytonServer(options).run()
  15. File "/ado/src/trytond/trytond/server.py", line 98, in run
  16. Pool(db_name).init(update=self.options.update, lang=lang)
  17. File "/ado/src/trytond/trytond/pool.py", line 140, in init
  18. self.start()
  19. File "/ado/src/trytond/trytond/pool.py", line 92, in start
  20. register_classes()
  21. File "/ado/src/trytond/trytond/modules/__init__.py", line 351, in register_classes
  22. mod_file, pathname, description)
  23. File "/ado/src/collecting_society/__init__.py", line 5, in <module>
  24. from .collecting_society import *
  25. File "/ado/src/collecting_society/collecting_society.py", line 585, in <module>
  26. class Content(ModelSQL, ModelView):
  27. File "/ado/src/collecting_society/collecting_society.py", line 614, in Content
  28. 'ir.attachment', domain=[('resource', '=', ('content', Eval('id')))])
  29. File "/ado/src/trytond/trytond/model/fields/many2one.py", line 49, in __init__
  30. depends=depends, context=context, loading=loading)
  31. File "/ado/src/trytond/trytond/model/fields/field.py", line 142, in __init__
  32. assert string, 'a string is required'
  33. AssertionError: a string is required
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement