jeffery9 / vscode-odoo-snippets

16 stars 15 forks source link

m2m snippet: reverse column1 and column2 attributes #5

Open LuisLopezMunoz opened 2 years ago

LuisLopezMunoz commented 2 years ago

current:

    field_name_ids = fields.Many2many(
        string='field_name',
        comodel_name='model.name',
        relation='model.name_this_model_rel',

        column1='model.name_id',
        column2='this_model_id',
    )

the right way is:

    field_name_ids = fields.Many2many(
        string='field_name',
        comodel_name='model.name',
        relation='model.name_this_model_rel',

        column1='this_model_id',
        column2='model.name_id',
    )
jeffery9 commented 1 year ago

thanks.