diff --git a/magic_note/README.rst b/magic_note/README.rst new file mode 100644 index 000000000..524dd8f30 --- /dev/null +++ b/magic_note/README.rst @@ -0,0 +1,73 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Magic Note +=========== +This module aims to automatically update the color of the notes/memo +in organizer tab under messaging menu. + +Installation +============ +- www.odoo.com/documentation/14.0/setup/install.html +- Install our custom addon + +Features +======== +* set a name for the category of coloured notes +* Select color from a pre defined list of colors +* Select a range of date limit(days) in integer form +* Updates the note's color in on-load of kanban view + +note: + + By default on installation of this module it creates + a field called dead date and sets it to the current date + + A new tab is created under settings-configuration where + >set default color when no date intervals are defined + >set color when any record doesn't come under date intervals + >set color for notes which exceed the deadline date + +FormView + + * select a name which is not compulsory set lower and upper limit of days + * Select the color + +ListView + * shows you the defied color and days(interval) + +Company +======= +* `Cybrosys Techno Solutions `__ + +License +======= +GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +======= +* Developer: (V14) RAHUL C K, Contact: odoo@cybrosys.com + +Contacts +======= +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. + +Further information +=================== +HTML Description: ``__ diff --git a/magic_note/__init__.py b/magic_note/__init__.py new file mode 100644 index 000000000..d835cf9c5 --- /dev/null +++ b/magic_note/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Rahul CK() +# you can modify it under the terms of the GNU AFFERO GENERAL +# PUBLIC LICENSE (AGPL v3), Version 3. + +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC +# LICENSE (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from . import models diff --git a/magic_note/__manifest__.py b/magic_note/__manifest__.py new file mode 100644 index 000000000..1baa00cf8 --- /dev/null +++ b/magic_note/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Rahul CK() +# you can modify it under the terms of the GNU AFFERO GENERAL +# PUBLIC LICENSE (AGPL v3), Version 3. + +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC +# LICENSE (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +{ + 'name': "Magic Note", + 'version': '14.0.1.0.0', + 'category': 'Productivity', + 'summary': """Automatically Change the Colour Based on the Date Interval + Config of Notes""", + 'description': """Set a date interval in integers. All notes belonging + to the period will be assigned the defined colour.""", + 'author': "Cybrosys Techno Solutions", + 'company': "Cybrosys Techno Solutions", + 'maintainer': "Cybrosys Techno Solutions", + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'note'], + 'data': [ + 'security/ir.model.access.csv', + 'data/magic_note_data.xml', + 'views/note_note_views.xml', + 'views/note_config_views.xml', + 'views/note_color_views.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/magic_note/data/magic_note_data.xml b/magic_note/data/magic_note_data.xml new file mode 100644 index 000000000..5f3218198 --- /dev/null +++ b/magic_note/data/magic_note_data.xml @@ -0,0 +1,11 @@ + + + + + + grey + blue + purple + + + diff --git a/magic_note/doc/RELEASE_NOTES.md b/magic_note/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..48914cd7f --- /dev/null +++ b/magic_note/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 04.09.2023 +#### Version 14.0.1.0.0 +#### ADD +- Initial commit for Magic Note diff --git a/magic_note/models/__init__.py b/magic_note/models/__init__.py new file mode 100644 index 000000000..c77bd21d1 --- /dev/null +++ b/magic_note/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Rahul CK() +# you can modify it under the terms of the GNU AFFERO GENERAL +# PUBLIC LICENSE (AGPL v3), Version 3. + +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC +# LICENSE (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from . import note_color +from . import note_config +from . import note_note diff --git a/magic_note/models/note_color.py b/magic_note/models/note_color.py new file mode 100644 index 000000000..4dec61f94 --- /dev/null +++ b/magic_note/models/note_color.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Rahul CK() +# you can modify it under the terms of the GNU AFFERO GENERAL +# PUBLIC LICENSE (AGPL v3), Version 3. + +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC +# LICENSE (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import fields, models + + +class NoteColor(models.Model): + """Specify the colors and intervals that is to be applied to the notes""" + _name = 'note.color' + _description = 'Note Colour Interval Fields' + + name = fields.Char(string="Criteria", help="Name for this date interval") + color_note = fields.Selection( + [('white', 'White'), ('grey', 'Grey'), ('orange', 'Orange'), + ('green', 'Green'), ('blue', 'Blue'), ('purple', 'Purple'), + ('pink', 'Pink'), ('red', 'Red')], required=True, default='white', + help="Colour of the record") + start_interval = fields.Integer(string="Lower limit", default='1', + required=True, + help="Starting interval should be a " + "integer (Number of days)") + end_interval = fields.Integer(string="Upper limit", default='2', + required=True, + help="End interval should be a integer " + "(Number of days)") diff --git a/magic_note/models/note_config.py b/magic_note/models/note_config.py new file mode 100644 index 000000000..3ea3dcc28 --- /dev/null +++ b/magic_note/models/note_config.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Rahul CK() +# you can modify it under the terms of the GNU AFFERO GENERAL +# PUBLIC LICENSE (AGPL v3), Version 3. + +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC +# LICENSE (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import fields, models + + +class NoteConfiguration(models.Model): + """Specify the colours for notes based on deadline""" + _name = 'note.config' + _rec_name = "default_magic_color" + _description = 'Note Colour Settings Field' + + default_magic_color = fields.Selection( + [('white', 'White'), ('grey', 'Grey'), ('orange', 'Orange'), + ('green', 'Green'), ('blue', 'Blue'), ('purple', 'Purple'), + ('pink', 'Pink'), ('red', 'Red')], string="Default", required=True, + default='white', help="This color will be set to the records if no " + "date interval record is found By default " + "records are coloured to white") + not_in_interval = fields.Selection( + [('white', 'White'), ('grey', 'Grey'), ('orange', 'Orange'), + ('green', 'Green'), ('blue', 'Blue'), ('purple', 'Purple'), + ('pink', 'Pink'), ('red', 'Red')], + string="If Not inside the Interval", required=True, default='grey', + help="This color will be set to the records which doesn't come under " + "any defined interval stages. By default the records are coloured" + " to Grey") + deadline_cross = fields.Selection( + [('white', 'White'), ('grey', 'Grey'), ('orange', 'Orange'), + ('green', 'Green'), ('blue', 'Blue'), ('purple', 'Purple'), + ('pink', 'Pink'), ('red', 'Red')], string="After deadline ", + required=True, default='blue', + help="This color will be set to the notes once they cross the dead " + "date") diff --git a/magic_note/models/note_note.py b/magic_note/models/note_note.py new file mode 100644 index 000000000..ee618c84a --- /dev/null +++ b/magic_note/models/note_note.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Rahul CK() +# you can modify it under the terms of the GNU AFFERO GENERAL +# PUBLIC LICENSE (AGPL v3), Version 3. + +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC +# LICENSE (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from dateutil.relativedelta import relativedelta +from odoo import api, fields, models + + +class NoteNote(models.Model): + """Create new fields deadline and note_color in notes""" + _inherit = 'note.note' + + deadline = fields.Date(string="Deadline", required=True, + default=fields.date.today(), + help="Specify deadline of note") + note_color = fields.Char(string="color", help="Color of Note") + + @api.model + def _fields_view_get(self, view_id=None, view_type='kanban', toolbar=False, + submenu=False): + """ + Check the intervals and set the colors to the notes which is configured + in settings + """ + res = super(NoteNote, self)._fields_view_get( + view_id=view_id, view_type=view_type, toolbar=toolbar, + submenu=submenu) + today_date = fields.date.today() + for rec in self.search([]): + days_difference = relativedelta(rec.deadline, today_date).days + interval_records = self.env['note.color'].search([]) + default_color_config = \ + self.env.ref('magic_note.view_note_configuration') + if not interval_records: + if today_date <= rec.deadline: + rec.note_color = default_color_config.default_magic_color + else: + rec.note_color = default_color_config.deadline_cross + else: + flag = 0 + for interval in interval_records: + if interval.start_interval <= days_difference < \ + interval.end_interval: + rec.note_color = interval.color_note + flag = 1 + if flag == 0: + rec.note_color = default_color_config.not_in_interval + return res diff --git a/magic_note/security/ir.model.access.csv b/magic_note/security/ir.model.access.csv new file mode 100644 index 000000000..039447214 --- /dev/null +++ b/magic_note/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_note_color,access.note.color,model_note_color,base.group_user,1,1,1,1 +access_note_config,access.note.config,model_note_config,base.group_user,1,1,1,1 diff --git a/magic_note/static/description/banner.png b/magic_note/static/description/banner.png new file mode 100644 index 000000000..9599391fa Binary files /dev/null and b/magic_note/static/description/banner.png differ diff --git a/magic_note/static/description/cybro_logo.png b/magic_note/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/magic_note/static/description/cybro_logo.png differ diff --git a/magic_note/static/description/icon.png b/magic_note/static/description/icon.png new file mode 100644 index 000000000..ff29185c2 Binary files /dev/null and b/magic_note/static/description/icon.png differ diff --git a/magic_note/static/description/images/1.png b/magic_note/static/description/images/1.png new file mode 100644 index 000000000..e29d7e316 Binary files /dev/null and b/magic_note/static/description/images/1.png differ diff --git a/magic_note/static/description/images/2.png b/magic_note/static/description/images/2.png new file mode 100644 index 000000000..de0c2ef12 Binary files /dev/null and b/magic_note/static/description/images/2.png differ diff --git a/magic_note/static/description/images/3.png b/magic_note/static/description/images/3.png new file mode 100644 index 000000000..e6f4f6d66 Binary files /dev/null and b/magic_note/static/description/images/3.png differ diff --git a/magic_note/static/description/images/4.png b/magic_note/static/description/images/4.png new file mode 100644 index 000000000..3afc14722 Binary files /dev/null and b/magic_note/static/description/images/4.png differ diff --git a/magic_note/static/description/images/5.png b/magic_note/static/description/images/5.png new file mode 100644 index 000000000..cea66b05f Binary files /dev/null and b/magic_note/static/description/images/5.png differ diff --git a/magic_note/static/description/images/6.png b/magic_note/static/description/images/6.png new file mode 100644 index 000000000..0c9bb377e Binary files /dev/null and b/magic_note/static/description/images/6.png differ diff --git a/magic_note/static/description/images/check-box.png b/magic_note/static/description/images/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/magic_note/static/description/images/check-box.png differ diff --git a/magic_note/static/description/images/checked.png b/magic_note/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/magic_note/static/description/images/checked.png differ diff --git a/magic_note/static/description/images/cybrosys.png b/magic_note/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/magic_note/static/description/images/cybrosys.png differ diff --git a/magic_note/static/description/images/hero.gif b/magic_note/static/description/images/hero.gif new file mode 100644 index 000000000..8974b7554 Binary files /dev/null and b/magic_note/static/description/images/hero.gif differ diff --git a/magic_note/static/description/images/image_1.png b/magic_note/static/description/images/image_1.png new file mode 100644 index 000000000..09f3b1bff Binary files /dev/null and b/magic_note/static/description/images/image_1.png differ diff --git a/magic_note/static/description/images/image_2.png b/magic_note/static/description/images/image_2.png new file mode 100644 index 000000000..08759f094 Binary files /dev/null and b/magic_note/static/description/images/image_2.png differ diff --git a/magic_note/static/description/images/image_3.png b/magic_note/static/description/images/image_3.png new file mode 100644 index 000000000..5a39d519a Binary files /dev/null and b/magic_note/static/description/images/image_3.png differ diff --git a/magic_note/static/description/images/image_4.png b/magic_note/static/description/images/image_4.png new file mode 100644 index 000000000..5726c5179 Binary files /dev/null and b/magic_note/static/description/images/image_4.png differ diff --git a/magic_note/static/description/images/image_5.png b/magic_note/static/description/images/image_5.png new file mode 100644 index 000000000..f2738e02c Binary files /dev/null and b/magic_note/static/description/images/image_5.png differ diff --git a/magic_note/static/description/index.html b/magic_note/static/description/index.html new file mode 100644 index 000000000..d4df4e926 --- /dev/null +++ b/magic_note/static/description/index.html @@ -0,0 +1,478 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+ +
+
+
+

+ Magic Note

+

+ Use Colors to Prioritise Your Notes in Odoo. +

+ +
+
+ + + +
+
+

+ Overview +

+
+ +
+

+ Color your notes automatically.

+
+

+ +
+ + +
+
+

+ Features +

+
+ +
+
+
+ + Community and Enterprise Support +
+
+ + This module helps you to prioritize notes by colour.The colour of notes changes based on the Dead date, + on every on-load of kanban view. +
+
+ + This feature helps you to differentiate notes easily. +
+
+ + Deadline date can be set inside notes. +
+
+
+ +
+
+

+ Screenshots +

+
+
+

+ Notes Form.

+

+ New menus are added under notes module 'Configuration'. +

+ +
+ +
+

+ Settings +

+

+ Under settings,
* Provide the default color of notes , color after the deadline date and the color if deadline is not inside the interval.
+ (Note: The default color and color after deadline will be updated only if a date interval is not created) +

+ +
+ +
+

+ Date Interval +

+

+ Under Date interval,
* Create an interval of days (Days from current date) to the deadline date.
* Lower limit and upper limit is used to create the interval. +

+ +
+ +
+

+ 'Deadline' field is created in notes to specify the deadline date of note. +

+ +
+ +
+

+ Colors will be shown in different notes with respect to the configurations set. +

+

+ Refresh the page to load the changes in the view. +

+ +
+
+ +
+
+

Suggested Products

+
+ + +
+
+ + + +
+

Our Service

+
+ +
+
+
+

Our Industries

+
+ +
+
+
+ +
+
+

Trading

+

Easily procure and sell your products.

+
+
+
+
+ +
+
+

Manufacturing

+

Plan, track and schedule your operations.

+
+
+
+
+ +
+
+

Restaurant

+

Run your bar or restaurant methodical.

+
+
+
+
+ +
+
+

POS

+

Easy configuring and convivial selling.

+
+
+
+
+ +
+
+

E-commerce & Website

+

Mobile friendly, awe-inspiring product pages.

+
+
+
+
+ +
+
+

Hotel Management

+

An all-inclusive hotel management application.

+
+
+
+
+ +
+
+

Education

+

A Collaborative platform for educational management.

+
+
+
+
+ +
+
+

Service Management

+

Keep track of services and invoice accordingly.

+
+
+
+
+
+
+
+
+
+

Need Any Help?

+
+

If you have anything to share with us based on your use of this module, please let us know. We are ready to offer our support.

+
+

Email us

+

odoo@cybrosys.com

+
+
+

Contact Us

+ www.cybrosys.com +
+
+
+
+
+
+
+
+
+ +
+ + + + + + + +
+
+
+
+ diff --git a/magic_note/views/note_color_views.xml b/magic_note/views/note_color_views.xml new file mode 100644 index 000000000..8c8cd6120 --- /dev/null +++ b/magic_note/views/note_color_views.xml @@ -0,0 +1,60 @@ + + + + + note.color.view.form + note.color + +
+ + + + + + + +
+
+
+
+
+
+
+
+
+
+ + + + note.color.view.tree + note.color + + + + + + + + + + + + + colour + note.color + + tree,form + +

Create the colour sets +

+
+
+ + +
diff --git a/magic_note/views/note_config_views.xml b/magic_note/views/note_config_views.xml new file mode 100644 index 000000000..e48e070cf --- /dev/null +++ b/magic_note/views/note_config_views.xml @@ -0,0 +1,39 @@ + + + + + note.config.view.form + note.config + +
+ + + + + +
+
+
+ + + + note.config.view.tree + note.config + + + + + + + + + + + + General Settings + note.config + tree,form + + + +
diff --git a/magic_note/views/note_note_views.xml b/magic_note/views/note_note_views.xml new file mode 100644 index 000000000..d97b5a073 --- /dev/null +++ b/magic_note/views/note_note_views.xml @@ -0,0 +1,88 @@ + + + + + note.note.view.kanban.inherit.magic.note + note.note + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + Follower + +
+ +
+ + + + + + + + + + note.note.view.form.inherit.magic.note + note.note + + + + + + + +