<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','=', 'invoiced')]}"/>
</xpath>
<xpath expr="//tree/field[@name='product_id']" position="attributes">
- <attribute name="domain">[('available_in_pos','=', True)]</attribute>
+ <attribute name="domain">[('sale_ok','=', True),('available_in_pos','=', True)]</attribute>
</xpath>
</field>
</record>
<field name="model">pos.session</field>
<field name="inherit_id" ref="point_of_sale.view_pos_session_form"/>
<field name="arch" type="xml">
- <xpath expr="//field[@name='config_id']" position="replace">
- <field name="config_id" widget="selection" domain="[('state','=', 'active')]"/>
+ <xpath expr="//field[@name='config_id']" position="attributes">
+ <attribute name="widget">selection</attribute>
+ <attribute name="domain">[('state', 'in', ('active',))]</attribute>
+ <attribute name="attrs">{'readonly': [('state', 'not in', ('opening_control',))]}</attribute>
</xpath>
</field>
</record>