Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3564 Ansichten

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>
Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Juli 22
8109
2
Nov. 18
5755
0
Feb. 25
1220
2
Dez. 24
1530
0
Juli 24
1229