[gen] Ref field: first cmplete version of Ref with link='popup'.
This commit is contained in:
parent
0bcd0055a3
commit
a45dfa8dd0
5 changed files with 93 additions and 45 deletions
|
@ -736,7 +736,7 @@ class ToolMixin(BaseMixin):
|
|||
elif ':' in name:
|
||||
# The search is defined in a Ref field with link=popup. Get the
|
||||
# search, the initiator object and the Ref field.
|
||||
uid, ref = name.split(':')
|
||||
uid, ref, mode = name.split(':')
|
||||
initiator = self.getObject(uid, appy=True)
|
||||
initiatorField = initiator.getField(ref)
|
||||
res = getattr(initiator.klass, ref).select
|
||||
|
@ -756,7 +756,7 @@ class ToolMixin(BaseMixin):
|
|||
# Return a UiSearch if required.
|
||||
if ui:
|
||||
res = UiSearch(res, className, self)
|
||||
if initiator: res.setInitiator(initiator, initiatorField)
|
||||
if initiator: res.setInitiator(initiator, initiatorField, mode)
|
||||
return res
|
||||
|
||||
def advancedSearchEnabledFor(self, klass):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue