Hello All,
I have two fields in odoo10 and after selected one 'service' from first field('selection' type field) then other field visible on form. And i want when other field visible on form view, it visible with the highlight or cursor(action) attraction on that field for focusing on that field. Second visible field visible in notebook/page. So, anyone can help for this type of action.
My python and XML code is here:
Python Code:
service_rental = fields.Selection([
('rental', 'Rental Management'),
('consultant', 'Cunsultant Name'),
('booking', 'Booking'),
], string='Services', copy=False, store=True)
pet_rental_service = fields.Many2one('rental.pet', string="Rental Management")
Xml Code:
<xpath expr="//notebook/page/group/group/field[@name='type']" position="after">
<field name="service_rental" attrs="{'invisible': [('type', '!=', 'service')]}"/>
</xpath>
<xpath expr="//notebook/page[1]" position="before">
<page string="Rental Management" attrs="{'invisible': [('service_rental', '!=', 'rental')]}">
<field name="pet_rental_service"/>
</page>
</xpath>