Test error when using reference field as _parent_ depends
This is a follup of !527 (comment 295958)
When adding the '_parent_shipment.carrier' fields on the depends I get the following traceback:
======================================================================
ERROR: test_view (test_module.StockPackageShippingTestCase) (view=Pool().get('ir.ui.view')(321))
Test validity of all views of the module
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/pokoli/projectes/tryton/trytond/trytond/tests/test_tryton.py", line 329, in test_view
res = Model.fields_view_get(view_id)
File "/home/pokoli/projectes/tryton/trytond/trytond/model/modelview.py", line 292, in fields_view_get
result['arch'], result['fields'] = cls.parse_view(
File "/home/pokoli/projectes/tryton/trytond/trytond/model/modelview.py", line 453, in parse_view
fields_def = cls.__parse_fields(
File "/home/pokoli/projectes/tryton/trytond/trytond/model/modelview.py", line 661, in __parse_fields
fields_attrs = cls.__parse_fields(
File "/home/pokoli/projectes/tryton/trytond/trytond/model/modelview.py", line 661, in __parse_fields
fields_attrs = cls.__parse_fields(
File "/home/pokoli/projectes/tryton/trytond/trytond/model/modelview.py", line 661, in __parse_fields
fields_attrs = cls.__parse_fields(
File "/home/pokoli/projectes/tryton/trytond/trytond/model/modelview.py", line 574, in __parse_fields
views = get_views(relation, widget, view_ids, mode)
File "/home/pokoli/projectes/tryton/trytond/trytond/model/modelview.py", line 544, in get_views
view = Relation.fields_view_get(view_id=view_id)
File "/home/pokoli/projectes/tryton/trytond/trytond/model/modelview.py", line 292, in fields_view_get
result['arch'], result['fields'] = cls.parse_view(
File "/home/pokoli/projectes/tryton/trytond/trytond/model/modelview.py", line 492, in parse_view
fields2 = cls.fields_get(list(fields_def.keys()), level=level)
File "/home/pokoli/projectes/tryton/trytond/trytond/model/model.py", line 204, in fields_get
relation_fields = Relation.fields_get(level=level - 1)
File "/home/pokoli/projectes/tryton/trytond/trytond/model/model.py", line 191, in fields_get
definition[fname] = field.definition(cls, language)
File "/home/pokoli/projectes/tryton/trytond/trytond/model/fields/function.py", line 175, in definition
definition = self._field.definition(model, language)
File "/home/pokoli/projectes/tryton/trytond/trytond/model/fields/field.py", line 528, in definition
target = target._fields[field[8:]].get_target()
AttributeError: 'Reference' object has no attribute 'get_target'