Skip to Content
Menu
This question has been flagged
3 Replies
13997 Views

Hi,

I tried to extend the 'event.track' model with a Many2many relation on 'event.track' itself but I get a weird error.

My code:

class advanced_tracks(models.Model):
_inherit = 'event.track'

is_main_track = fields.Boolean(string="Is a Main Track", default="False")

chair_ids = fields.Many2many(comodel_name="res.partner", relation="track_chairs", column1="track", culomn2="chair", string="Chairs")

main_track = fields.Many2many(comodel_name="event.track", relation="minitracks", column1="main_track", culomn2="mini_track_ids")
mini_track_ids = fields.Many2many(comodel_name="event.track", relation="minitracks", column1="mini_track_ids", culomn2="main_track")

The error:

ProgrammingError: column minitracks.mini_track_ids does not exist
LINE 1: SELECT minitracks.event_track_id, minitracks.mini_track_ids ...

Does anybody have an idea how to fix that?

Avatar
Discard

upgraded module after the change?

Author

yes I have

Best Answer

You have a typo in cour code... check :.

chair_ids = fields.Many2many(comodel_name="res.partner", relation="track_chairs", column1="track", culomn2="chair", string="Chairs")


Avatar
Discard
Related Posts Replies Views Activity
2
Jun 19
1682
1
Apr 24
5183
0
Mar 15
3488
1
Nov 24
147
1
Jul 22
5928