diff --git a/addons/note/models/note.py b/addons/note/models/note.py index 3d63afb75b8..c668e1503ff 100644 --- a/addons/note/models/note.py +++ b/addons/note/models/note.py @@ -42,6 +42,7 @@ class Note(models.Model): name = fields.Text( compute='_compute_name', string='Note Summary', store=True, readonly=False) + company_id = fields.Many2one('res.company') user_id = fields.Many2one('res.users', string='Owner', default=lambda self: self.env.uid) memo = fields.Html('Note Content') sequence = fields.Integer('Sequence') diff --git a/addons/note/security/note_security.xml b/addons/note/security/note_security.xml index 3b657e48633..730c9f9d55b 100644 --- a/addons/note/security/note_security.xml +++ b/addons/note/security/note_security.xml @@ -1,5 +1,11 @@ + + Note - Multi-Company + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + + Only followers can access a sticky notes diff --git a/addons/note/views/note_views.xml b/addons/note/views/note_views.xml index a17827c804c..e614a37d454 100644 --- a/addons/note/views/note_views.xml +++ b/addons/note/views/note_views.xml @@ -170,10 +170,11 @@
+
- +