I have a class with a Many2One field to product.uom as per below and the form uses . I tried to figure it out by looking at the country field on party.address in vain.
class UnitCode(ModelSQL, ModelView):
"Unit Code"
__name__ = 'masterol_foods.unitcode'
unit = fields.Many2One('product.uom','Unit', required=True)
code = fields.Char('Code', required=True)
You can define domain to filter the results. Example 1, Example 2
I don’t know if it’s what are you looking for, if not, please try to define better your needs.
No, I don’t want to filter the result. I want to define what select drop down options are show to the user in the UI. At the moment what is shown is the ID of the records from the database.