El 27/05/14 10:51, Katsandres ha escrit:
Hi all,

How can I set mandatory fields as "not mandatory";
Just create a module and override the required property [1] of the field via the __setup__ method. Something like


class YourModel:
   __name__ = 'model.name'


   @classmethod
   def __setup__(cls):
       super(YourModel, cls).__setup__()
       cls.field_name.required = False


[1] http://doc.tryton.org/3.2/trytond/doc/ref/models/fields.html?highlight=required#trytond.model.fields.Field.required

--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Reply via email to