diff --git a/pos_checklist/README.md b/pos_checklist/README.md new file mode 100755 index 000000000..a71040c26 --- /dev/null +++ b/pos_checklist/README.md @@ -0,0 +1,36 @@ +Pos Checklist +========================= + +Checklist for Point Of sale Cashier. + + +Installation +============ +- www.odoo.com/documentation/11.0/setup/install.html +- Install our custom addon + +License +======= +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(http://www.gnu.org/licenses/agpl.html) + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Credits +======= +* Cybrosys Techno Solutions + +Author +------ + +Developer: Sayooj AO @ Cybrosys + +Maintainer +---------- + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. + diff --git a/pos_checklist/__init__.py b/pos_checklist/__init__.py new file mode 100644 index 000000000..f5ba686bc --- /dev/null +++ b/pos_checklist/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import models \ No newline at end of file diff --git a/pos_checklist/__manifest__.py b/pos_checklist/__manifest__.py new file mode 100644 index 000000000..f685aea42 --- /dev/null +++ b/pos_checklist/__manifest__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +{ + 'name': "Pos Checklist", + 'version': '11.0.1.0.0', + 'summary': """Checklist for Point Of sale Cashier""", + 'description': """Checklist for Point Of sale Cashier""", + 'category': 'Point Of Sale', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "", + 'depends': ['base', 'point_of_sale', 'oh_employee_creation_from_user', 'document', 'hr'], + 'data': [ + 'views/admin_view.xml', + 'security/ir.model.access.csv', + 'security/security.xml', + 'data/cron.xml', + ], + 'qweb': [], + 'demo': [], + 'images': ['static/description/banner.png'], + 'license': "AGPL-3", + 'installable': True, + 'application': True, +} diff --git a/pos_checklist/data/cron.xml b/pos_checklist/data/cron.xml new file mode 100644 index 000000000..640c83155 --- /dev/null +++ b/pos_checklist/data/cron.xml @@ -0,0 +1,37 @@ + + + + + Daily Task Update + 1 + days + -1 + code + + + model.add_day_cron() + + + + Weekly Task Update + 1 + weeks + -1 + code + + + model.add_week_cron() + + + + Monthly Task Update + 1 + months + -1 + code + + + model.add_month_cron() + + + \ No newline at end of file diff --git a/pos_checklist/doc/RELEASE_NOTES.md b/pos_checklist/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..ed20c25c0 --- /dev/null +++ b/pos_checklist/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 19.03.2019 +#### Version 11.0.1.0.0 +##### ADD +- Initial commit diff --git a/pos_checklist/models/__init__.py b/pos_checklist/models/__init__.py new file mode 100644 index 000000000..5d95daaa9 --- /dev/null +++ b/pos_checklist/models/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import admin_form diff --git a/pos_checklist/models/admin_form.py b/pos_checklist/models/admin_form.py new file mode 100644 index 000000000..fbfba304d --- /dev/null +++ b/pos_checklist/models/admin_form.py @@ -0,0 +1,146 @@ +# -*- coding: utf-8 -*- +from odoo import models, fields, api +import datetime +from datetime import datetime + + +class ToDoList(models.Model): + + _name = 'todo.list' + _rec_name = "accountant" + + accountant = fields.Many2one('hr.employee', string='Cashier') + img_view = fields.Binary() + todo_menu = fields.One2many('todo.menu.line', 'connect_id', string="To DO List") + note = fields.Text('Comments', translate=True) + + @api.onchange('accountant') + def onchange_accountant(self): + for i in self: + result = i.env['hr.employee'].search([('id', '=', i.accountant.id)]) + for k in result: + i.img_view = k.image + + + @api.multi + def add_day_cron(self): + print('Day Cron') + for data in self.env['todo.list'].search([]): + days = [] + dates = datetime.today() + result = self.env['todo.activity'].search([('activity_type', '=', 'day')]) + for i in result: + vals = (0, 0, { + 'todo_name': i.id, + 'todo_type': 'day', + 'todo_date': dates, + }) + days.append(vals) + data.update({'todo_menu': days}) + + @api.multi + def add_week_cron(self): + print('Week Cron') + for data in self.env['todo.list'].search([]): + weeks = [] + dates = datetime.today() + result = self.env['todo.activity'].search([('activity_type', '=', 'week')]) + for i in result: + vals = (0, 0, { + 'todo_name': i.id, + 'todo_type': 'week', + 'todo_date': dates, + }) + weeks.append(vals) + data.update({'todo_menu': weeks}) + + @api.multi + def add_month_cron(self): + print('Month Cron') + for data in self.env['todo.list'].search([]): + months = [] + dates = datetime.today() + result = self.env['todo.activity'].search([('activity_type', '=', 'month')]) + for i in result: + vals = (0, 0, { + 'todo_name': i.id, + 'todo_type': 'month', + 'todo_date': dates, + }) + months.append(vals) + data.update({'todo_menu': months}) + + +class ToDoListLine(models.Model): + _name = 'todo.menu.line' + + connect_id = fields.Many2one('todo.list', string='Description', required=True) + todo_name = fields.Many2one('todo.activity',string='Title', required=True, readonly=True) + todo_type = fields.Selection([ + ('day', 'Daily'), + ('week', 'Weekly'), + ('month', 'Monthly') + ],readonly=True) + todo_date = fields.Date(string="date", readonly=False) + todo_checked = fields.Boolean(string='Status', readonly=True) + colour_check = fields.Boolean(string='check', compute='get_colour') + + @api.multi + def action_check_bool(self): + for i in self: + i.todo_checked = True + + @api.multi + def get_colour(self): + current_date = datetime.today() + for i in self: + date_object = datetime.strptime(i.todo_date, '%Y-%m-%d') + difference = current_date - date_object + if i.todo_type == 'day': + if difference.days >= 1 and not i.todo_checked: + i.colour_check = True + elif difference.days <= 1 and not i.todo_checked: + i.colour_check = False + + if i.todo_type == 'week': + if difference.days >= 7 and not i.todo_checked: + i.colour_check = True + elif difference.days <= 7 and not i.todo_checked: + i.colour_check = False + + if i.todo_type == 'month': + if difference.days >= 30 and not i.todo_checked: + i.colour_check = True + elif difference.days <= 30 and not i.todo_checked: + i.colour_check = False + + +class Activities(models.Model): + + _name = 'todo.activity' + _rec_name = 'activity_description' + + activity_description = fields.Char(string='Description', required=True) + activity_type = fields.Selection([ + ('day', 'Daily'), + ('week', 'Weekly'), + ('month', 'Monthly') + ], required=True) + + +class CashierEmployee(models.Model): + + _inherit = 'hr.employee' + + is_cashier = fields.Boolean(string='Is Cashier', default=False) + + @api.constrains('is_cashier') + def constrain_is_cashier(self): + for rec in self: + if rec.is_cashier: + vals = { + 'accountant': rec.id, + 'img_view': rec.image, + } + cashier = rec.env['todo.list'].sudo().create(vals) + diff --git a/pos_checklist/security/ir.model.access.csv b/pos_checklist/security/ir.model.access.csv new file mode 100755 index 000000000..bfd09f69f --- /dev/null +++ b/pos_checklist/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_todo_list,access_todo_list_line,pos_checklist.model_todo_list,point_of_sale.group_pos_manager,1,1,0,0 +access_todo_menu_line,access_user_menu_line,pos_checklist.model_todo_menu_line,point_of_sale.group_pos_manager,1,1,0,0 diff --git a/pos_checklist/security/security.xml b/pos_checklist/security/security.xml new file mode 100644 index 000000000..c9939561b --- /dev/null +++ b/pos_checklist/security/security.xml @@ -0,0 +1,15 @@ + + + + Cashier Visibility + + ['|', ('accountant.user_id.id','=',user.id), ('accountant','=',False)] + + + + Unlink Visibility + + [('todo_checked','=',False)] + + + \ No newline at end of file diff --git a/pos_checklist/static/description/banner.png b/pos_checklist/static/description/banner.png new file mode 100644 index 000000000..44fbc5576 Binary files /dev/null and b/pos_checklist/static/description/banner.png differ diff --git a/pos_checklist/static/description/icon.png b/pos_checklist/static/description/icon.png new file mode 100644 index 000000000..e8bf7c958 Binary files /dev/null and b/pos_checklist/static/description/icon.png differ diff --git a/pos_checklist/static/description/index.html b/pos_checklist/static/description/index.html new file mode 100644 index 000000000..f63faeeae --- /dev/null +++ b/pos_checklist/static/description/index.html @@ -0,0 +1,412 @@ + +
+
+

+ POS Cashier Checklist +

+

+ Module For Managing The Activities Of Cashier +

+
+ Cybrosys Technologies +
+ +
+ cybrosys technologies +
+
+
+
+ +
+
+

+ Overview +

+

+ POS Cashier Checklist module helps to manage the Daily,Weekly and Monthly activities of cashier.In which the activities are + automatically created according the interval of time +

+

+ Configuration +

+

+ No additional configuration required +

+
+
+ +
+
+

+ Features +

+

+ + Creating Daily,Weekly and Monthly Activities. +

+

+ + Assign the activities automatically to the cashiers. +

+

+ + Indication of Due activities +

+

+ + Marking the status of activities +

+

+ + Option for adding attachments and internalnotes +

+
+
+ +
+
+

+ Screenshots +

+

+ + For assigning the activities to an employee first we have to make the field "Is Cashier" true in the employee form +

+
+ +
+

+ + We can see the list of cashier in the menu of "Activities" +

+
+ +
+

+ + We can create the list and type of activities in the menu "Activity List" +

+
+ +
+

+ + We have to set the description and type of the activity while creating a new activity +

+
+ +
+

+ + From here we can see the list of created activities +

+
+ +
+

+ + There is an option provided for adding the attachments and internal note in the Cashier form +

+
+ +
+

+ + Assigning activities are automated actions, if we want to run manually then go to Settings->Enable Developer Mode-> + Technical Settings->Scheduled Actions, there we can see our actions for Daily,Weekly and Monthly Tasks. +

+
+ +
+

+ + Click on the button "Run Manualy" for running the selected task +

+
+ +
+

+ + If any of the task is in due then it will indicated in red colour and all other in blue colour +

+
+ +
+

+ + Click on the "Tick" button to mark the activity as done,if we mark the status as done then the activity will disappear from the + menu of activities if the user is not admin. +

+
+ +
+ +
+
+ +
+
+ cybrosys technologies +
+
+
+
+

+ Our Services +

+
+ + + +
+ +
+ + + +
+

+ + Odoo Support +

+ +
+ +
+
+
+
+
+

+ Our Industries +

+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Trading + +

+

+ Easily procure and sell your products. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Manufacturing +

+

+ Plan, track and schedule your operations. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Restaurant +

+

+ Run your bar or restaurant methodical. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + POS +

+

+ Easy configuring and convivial selling. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + E-commerce & Website +

+

+ Mobile friendly, awe-inspiring product pages. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Hotel Management +

+

+ An all-inclusive hotel management application. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Education +

+

+ A Collaborative platform for educational management. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Service Management +

+

+ Keep track of services and invoice accordingly. +

+
+
+
+
+
+
+ +
diff --git a/pos_checklist/static/description/pos-checklist-1.png b/pos_checklist/static/description/pos-checklist-1.png new file mode 100644 index 000000000..b148e2bea Binary files /dev/null and b/pos_checklist/static/description/pos-checklist-1.png differ diff --git a/pos_checklist/static/description/pos-checklist-10.png b/pos_checklist/static/description/pos-checklist-10.png new file mode 100644 index 000000000..23c44918f Binary files /dev/null and b/pos_checklist/static/description/pos-checklist-10.png differ diff --git a/pos_checklist/static/description/pos-checklist-11.png b/pos_checklist/static/description/pos-checklist-11.png new file mode 100644 index 000000000..268d4585d Binary files /dev/null and b/pos_checklist/static/description/pos-checklist-11.png differ diff --git a/pos_checklist/static/description/pos-checklist-2.png b/pos_checklist/static/description/pos-checklist-2.png new file mode 100644 index 000000000..b184b3a64 Binary files /dev/null and b/pos_checklist/static/description/pos-checklist-2.png differ diff --git a/pos_checklist/static/description/pos-checklist-3.png b/pos_checklist/static/description/pos-checklist-3.png new file mode 100644 index 000000000..c03c4f735 Binary files /dev/null and b/pos_checklist/static/description/pos-checklist-3.png differ diff --git a/pos_checklist/static/description/pos-checklist-4.png b/pos_checklist/static/description/pos-checklist-4.png new file mode 100644 index 000000000..d9fb3bef1 Binary files /dev/null and b/pos_checklist/static/description/pos-checklist-4.png differ diff --git a/pos_checklist/static/description/pos-checklist-5.png b/pos_checklist/static/description/pos-checklist-5.png new file mode 100644 index 000000000..904555822 Binary files /dev/null and b/pos_checklist/static/description/pos-checklist-5.png differ diff --git a/pos_checklist/static/description/pos-checklist-6.png b/pos_checklist/static/description/pos-checklist-6.png new file mode 100644 index 000000000..e29cb8a08 Binary files /dev/null and b/pos_checklist/static/description/pos-checklist-6.png differ diff --git a/pos_checklist/static/description/pos-checklist-7.png b/pos_checklist/static/description/pos-checklist-7.png new file mode 100644 index 000000000..b5bff00c4 Binary files /dev/null and b/pos_checklist/static/description/pos-checklist-7.png differ diff --git a/pos_checklist/static/description/pos-checklist-8.png b/pos_checklist/static/description/pos-checklist-8.png new file mode 100644 index 000000000..f5af973a6 Binary files /dev/null and b/pos_checklist/static/description/pos-checklist-8.png differ diff --git a/pos_checklist/static/description/pos-checklist-9.png b/pos_checklist/static/description/pos-checklist-9.png new file mode 100644 index 000000000..591ab02ca Binary files /dev/null and b/pos_checklist/static/description/pos-checklist-9.png differ diff --git a/pos_checklist/views/admin_view.xml b/pos_checklist/views/admin_view.xml new file mode 100644 index 000000000..465311ddb --- /dev/null +++ b/pos_checklist/views/admin_view.xml @@ -0,0 +1,154 @@ + + + + + ToDoTree + todo.list + + + + + + + + + + ActivityTree + todo.activity + + + + + + + + + + + ToDoList + todo.list + + +
+ + +
+ +
+

+

+ +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + +