[VIEW] +make pos_config field readonly when the session is not in opening control...
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Mon, 22 Jan 2018 10:01:53 +0000 (11:01 +0100)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Mon, 22 Jan 2018 10:01:53 +0000 (11:01 +0100)
view/point_of_sale.xml

index 5ac0901..7d7707f 100644 (file)
@@ -37,7 +37,8 @@
             <field name="arch" type="xml">
                 <xpath expr="//field[@name='config_id']" position="attributes">
                     <attribute name="widget">selection</attribute>
-                    <attribute name="domain">[('state', '=', 'active')]</attribute>
+                    <attribute name="domain">[('state', 'in', ('active',))]</attribute>
+                    <attribute name="attrs">{'readonly': [('state', 'not in', ('opening_control',))]}</attribute>
                 </xpath>
             </field>
         </record>