[VIEW][PYTHON][TRANS] +fixed price field in products categories
[burette/etudesetchantiersidf.git] / view / point_of_sale.xml
index efb1745..80f794f 100644 (file)
@@ -9,7 +9,12 @@
                 <xpath expr="//field[@name='partner_id']" position="replace">
                     <field name="partner_id" on_change="onchange_partner_id(partner_id, context)" context="{'search_default_customer': 1, 'form_view_ref': 'bikecoop.view_bikecoop_members_form'}" attrs="{'readonly': [('state','in', ('paid', 'done', 'invoiced'))]}" required="1" placeholder="LASTNAME Firstname" />
                 </xpath>
-
+                <xpath expr="//field[@name='price_subtotal_incl']" position="after">
+                    <field name="is_fixed_price" invisible="1"/>
+                </xpath>
+                <xpath expr="//field[@name='price_unit']" position="attributes">
+                    <attribute name="attrs">{'readonly':[('is_fixed_price','=', True)]}</attribute>
+                </xpath>
             </field>
         </record>
     </data>