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

dear odooers 
i'am added a many2many field in product.template that contains a car details in lines 
can filter or search in columns of the line in product search bar 

class autopart(models.Model):
_inherit = 'product.template'
related = fields.Many2many(comodel_name="relate",relation='car', string="", )
class relate(models.Model):
_name = 'relate'
_rec_name = 'code'

code = fields.Char(string="product Code", required=False)
car = fields.Many2one(comodel_name="cars", string="car", required=True, ondelete='restrict', )
model = fields.Many2many(comodel_name="models", string="",domain="[('car','=', car )]" )

start = fields.Char(string="", required=False, )
end = fields.Char(string="", required=False, )
rang = fields.One2many(comodel_name="yearrange", inverse_name="product_id", store=True, string="Years")
pro = fields.Integer(string="", required=False, )

Awatar
Odrzuć
Najlepsza odpowiedź

Hello,

Yes you can added many2many field in search bar like in product screen use tags but if you want to added this field in group by than you can't.

THANKS 


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
sie 19
2800
1
lut 23
1996
2
lut 23
2806
1
cze 22
2929
0
cze 22
2415