Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
2175 Widoki

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 .

Awatar
Odrzuć
Najlepsza odpowiedź

Hello priyanka.s.paththa

please uninstall partner_autocomplete module.

Awatar
Odrzuć
Najlepsza odpowiedź

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.


Awatar
Odrzuć