1
votes

This is a custom model defined in Odoo 12, it indicates which vehicles are in use on a given day:

class DailyVehicleMap(models.Model):
    _name = 'x_vehiclecalendar'
    date = fields.Date("Day", required=True)    
    vehicle = fields.Many2one('fleet.vehicle', 'Vehicle', required=True)

Although there are many entries in the fleet.vehicle table, they are not accessible to me when I try to add a record to x_vehiclecalendar.

screenshot of Odoo view When I click the corresponding dropdown field, there is only a "create and edit" option, whereas I was expecting a list of suggestions from the table of vehicles.

If I press "Create and edit" to create a new vehicle entry - it goes to the vehicles table and is visible in the regular vehicle view, but it is not visible in the view I made for the x_vehiclecalendar model (i.e., the one in the screenshot).

The access rights and record access rules were adjusted such that my current user can do everything: Access rights Record rules

What is the reason of this behaviour and how can it be corrected?

1
how is your xml define? I think you should put some widget like many2one_list or somethingsouthernegro

1 Answers

0
votes

I could think of two possibilities XML domain or record access rule, did you apply any ?