Skip to Content
Menu
This question has been flagged
2 Replies
1652 Views

Hello, i have one many2one field in my odoo v15 and I want to remove the auto-suggestion option from it. how can I do this .

Avatar
Discard
Best Answer

To remove the auto-suggestion feature from a many2one field in Odoo, you will need to modify the field's widget. A widget is a graphical element that is used to display a field in the user interface.

To modify the widget of a many2one field, you will need to create a custom module and override the field's definition in your module's fields.py file. For example:

Copy codefrom odoo import models, fields

class CustomModel(models.Model):
    _name = 'custom.model'

    field_name = fields.Many2one('other.model', string='Field Name',
                                 widget='many2one_no_auto_complete')

This will change the widget of the field_name field from the default many2one widget to the many2one_no_auto_complete widget, which does not include the auto-suggestion feature.


Avatar
Discard
Best Answer

Hello priyanka.s.paththa

please uninstall partner_autocomplete module.

Avatar
Discard