[VIEW] ~fix required date_from and date_to fields in membership products form view
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Tue, 17 Nov 2015 14:44:52 +0000 (15:44 +0100)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Tue, 17 Nov 2015 14:44:52 +0000 (15:44 +0100)
view/membership.xml

index 338fe8b..5ce9357 100644 (file)
                 <xpath expr="//div[child::field[@name='membership_date_from']]" position="attributes">
                     <attribute name="attrs">{'invisible': [('membership_date2date','=',True)]}</attribute>
                 </xpath>
                 <xpath expr="//div[child::field[@name='membership_date_from']]" position="attributes">
                     <attribute name="attrs">{'invisible': [('membership_date2date','=',True)]}</attribute>
                 </xpath>
-                <xpath expr="//div/field[@name='membership_date_from']" position="attributes">
-                    <attribute name="attrs">{'required': ['&amp;',('membership','=',True),('membership_date2date','=',False)]}</attribute>
+                <xpath expr="//field[@name='membership_date_from']" position="replace">
+                    <field name="membership_date_from" class="oe_inline" attrs="{'required': ['&amp;', ('membership', '=', True), ('membership_date2date','=', False)]}"/>
                 </xpath>
                 </xpath>
-                <xpath expr="//div/field[@name='membership_date_to']" position="attributes">
-                    <attribute name="attrs">{'required': ['&amp;',('membership','=',True),('membership_date2date','=',False)]}</attribute>
+                <xpath expr="//field[@name='membership_date_to']" position="replace">
+                    <field name="membership_date_to" class="oe_inline" attrs="{'required': ['&amp;', ('membership', '=', True), ('membership_date2date','=', False)]}"/>
                 </xpath>
             </field>
         </record>
                 </xpath>
             </field>
         </record>