On 06/03/2014 10:35 PM, Sergio Corato wrote:
> Hi Nicola, Lorenzo, Holger,
> what about delete "commercial_month" field and put this code instead?
> "if line.months != 0:"
>
> And in the view set the field "days" required if "months" if false and viceversa:
>
> <field name="months" attrs="{'required':[('days','=',False)]}"/>
>
> and
>
> <xpath expr="/form/group/group/field[@name='days']" position="attributes">
> <attribute name="attrs">{'required':[('months','=',False)]}</attribute>
> </xpath>
Ciao Sergio,
this means a user could fill both the 'months' and 'days' fields at the
same time, despite they are mutually exclusive.
On 06/03/2014 10:35 PM, Sergio Corato wrote: {'required' :[('days' ,'=',False) ]}"/> form/group/ group/field[ @name=' days']" position= "attributes" > >{'required' :[('months' ,'=',False) ]}</attribute>
> Hi Nicola, Lorenzo, Holger,
> what about delete "commercial_month" field and put this code instead?
> "if line.months != 0:"
>
> And in the view set the field "days" required if "months" if false and viceversa:
>
> <field name="months" attrs="
>
> and
>
> <xpath expr="/
> <attribute name="attrs"
> </xpath>
Ciao Sergio,
this means a user could fill both the 'months' and 'days' fields at the
same time, despite they are mutually exclusive.