Skip to content
Snippets Groups Projects
Unverified Commit 80aa17aa authored by Martin Trigaux's avatar Martin Trigaux
Browse files

[FIX] note: properly set the default method

stage_id is comptued and based on stage_ids
The default value should be put on stage_ids, not stage_id, it has the same
effect but avoids an unecessary chain update.
parent 583e92b1
No related branches found
No related tags found
No related merge requests found
......@@ -45,8 +45,9 @@ class Note(models.Model):
memo = fields.Html('Note Content')
sequence = fields.Integer('Sequence')
stage_id = fields.Many2one('note.stage', compute='_compute_stage_id',
inverse='_inverse_stage_id', default=_get_default_stage_id, string='Stage')
stage_ids = fields.Many2many('note.stage', 'note_stage_rel', 'note_id', 'stage_id', string='Stages of Users')
inverse='_inverse_stage_id', string='Stage')
stage_ids = fields.Many2many('note.stage', 'note_stage_rel', 'note_id', 'stage_id',
string='Stages of Users', default=_get_default_stage_id)
open = fields.Boolean(string='Active', track_visibility='onchange', default=True)
date_done = fields.Date('Date done')
color = fields.Integer(string='Color Index')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment