Hello,
I have a problem with the fleet app that I inherit the fleet.vehicle model for my purposes
I want to make a driver an employee and so I substituted the driver_id which is related with res.partner with employee_id which is related with hr.employee. The problem is that when I do this thing everything is work in the form but when I try to add a new contract from the Vehichle contract menu, when I open the many2one selection i see only the Create and edit button even if I create 12-13 vehichles!
HEre is the code:
In fleet_vehicle.py:
driver_id = fields.Many2one('res.partner', string="Driver",translate=True)
employee_id = fields.Many2one('hr.employee',string="Driver",domain('name_dep', '=', 'Drivers')])
In fleet_vehicle_view.xml:
<field name="driver_id" position="replace">
<field invisible="1" name="driver_id"/>
<field domain="[('name_dep', '=', 'Drivers')]" string="Driver" name="employee_id"/>
</field>
What should I do? I understand that HERE is the problem because if I don't switch the ids of the drivers everything works.
Thank you