From a22ec87316cb4b728585df7eff15502476d8b409 Mon Sep 17 00:00:00 2001 From: Fabien Bourgeois Date: Mon, 1 Aug 2016 06:51:30 +0200 Subject: [PATCH] [ADD]Note priority --- note_priority/__init__.py | 18 ++++++++ note_priority/__openerp__.py | 30 ++++++++++++++ note_priority/models/__init__.py | 18 ++++++++ note_priority/models/note.py | 27 ++++++++++++ note_priority/views/note_priority.xml | 60 +++++++++++++++++++++++++++ 5 files changed, 153 insertions(+) create mode 100644 note_priority/__init__.py create mode 100644 note_priority/__openerp__.py create mode 100644 note_priority/models/__init__.py create mode 100644 note_priority/models/note.py create mode 100644 note_priority/views/note_priority.xml diff --git a/note_priority/__init__.py b/note_priority/__init__.py new file mode 100644 index 0000000..2fca3d2 --- /dev/null +++ b/note_priority/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +# Copyright 2016 Fabien Bourgeois +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +from . import models diff --git a/note_priority/__openerp__.py b/note_priority/__openerp__.py new file mode 100644 index 0000000..1ea1783 --- /dev/null +++ b/note_priority/__openerp__.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- + +# Copyright 2016 Fabien Bourgeois +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +{ + 'name': 'Note Priority', + 'summary': 'Basic priority management for notes', + 'description': 'Basic priority management for notes', + 'version': '0.1', + 'category': 'Tools', + 'author': 'Fabien Bourgeois', + 'license': 'AGPL-3', + 'application': False, + 'installable': True, + 'depends': ['note_base'], + 'data': ['views/note_priority.xml'] +} diff --git a/note_priority/models/__init__.py b/note_priority/models/__init__.py new file mode 100644 index 0000000..998e8d7 --- /dev/null +++ b/note_priority/models/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +# Copyright 2016 Fabien Bourgeois +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +from . import note diff --git a/note_priority/models/note.py b/note_priority/models/note.py new file mode 100644 index 0000000..399089f --- /dev/null +++ b/note_priority/models/note.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- + +# Author: Fabien Bourgeois. Copyright Yaltik +# Copyright (C) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +from openerp import fields, models + + +class Note(models.Model): + + _inherit = 'note.note' + priority = fields.Selection([('0', 'Low'), ('1', 'Medium'), + ('2', 'Important'), ('3', 'Urgent')], + 'Priority', default='1') diff --git a/note_priority/views/note_priority.xml b/note_priority/views/note_priority.xml new file mode 100644 index 0000000..aa3625b --- /dev/null +++ b/note_priority/views/note_priority.xml @@ -0,0 +1,60 @@ + + + + + + + + + + Add priority field for note form + note.note + + + + + + + + + + Note Priority on Kanban + note.note + + + +

+
+
+
+ + + Note group by priority + note.note + + + + + + + + +
+