I've created a link between certain modules and Notes. At first I made all relationships One2many. The client has asked for them to be Many2many. My issues come when I click on a Project's (for example) note. When it was a One2many, the context="{'search_default_project': [active_id], 'default_project': active_id}" would use its title. Since I switched it to a Many2many, it now uses its numerical ID. If it uses its ID, I cannot create new notes because it needs the title value, not the ID value. Images below for reference: Directed from Project's note smart button \\\\\ | |
Well, it didn't add 2 of my pictures and I can't edit my post or add images in the comments. I'll have to create a new post...
project = fields.Many2many(comodel_name="project.project", rel="project_note_rel", column1="note_id", column2="project_id", string="Project")
Change the value of column2 to something besides project_id but I don't really know what the options are.