예제 #1
0
 def get_meta(self, context={}):
     vals = {
         "name": self.name,
         "string": _(self.string),
         "required": self.required,
         "on_change": self.on_change,
         "readonly": self.readonly,
     }
     return vals
예제 #2
0
 def get_meta(self, context={}):
     vals = super(Selection, self).get_meta(context=context)
     vals["type"] = "selection"
     if isinstance(self.selection, str):
         m = netforce.model.get_model(self.model)
         f = getattr(m, self.selection)
         sel = f(context=context)
     else:
         sel = self.selection
     vals["selection"] = [(k, _(v)) for k, v in sel]
     return vals
예제 #3
0
def _translate(this, val):
    return _(val)
예제 #4
0
def _translate(this, val):
    return _(val)