diff --git a/front_office_management/README.rst b/front_office_management/README.rst new file mode 100644 index 000000000..486fda1a0 --- /dev/null +++ b/front_office_management/README.rst @@ -0,0 +1,22 @@ +=========================== +Front Office Management v11 +=========================== + +Helps You To Manage Front Office Operations. + +Installation +============ + +Just install the module. + +Configuration +============= + +Nothing to configure. + +Credits +======= +Anusha P P @ cybrosys, anusha@cybrosys.in +Niyas Raphy @ cybrosys, niyas@cybrosys.in + + diff --git a/front_office_management/__init__.py b/front_office_management/__init__.py new file mode 100644 index 000000000..86bbedb0f --- /dev/null +++ b/front_office_management/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies(). +# Author: Anusha P P() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +from . import models diff --git a/front_office_management/__manifest__.py b/front_office_management/__manifest__.py new file mode 100644 index 000000000..e8377f4d7 --- /dev/null +++ b/front_office_management/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies(). +# Author: Anusha P P() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': "Front Office Management", + 'version': '11.0.1.0.0', + 'summary': """Manage Front Office Operations:Visitors, Devices Carrying Register, Actions""", + 'description': """Helps You To Manage Front Office Operations""", + 'author': "Cybrosys Techno Solutions", + 'maintainer': 'Cybrosys Techno Solutions', + 'company': "Cybrosys Techno Solutions", + 'website': "https://www.cybrosys.com", + 'category': 'Industries', + 'depends': ['base', 'hr'], + 'data': [ + 'views/fo_visit.xml', + 'views/fo_visitor.xml', + 'views/fo_property_counter.xml', + 'report/report.xml', + 'report/fo_property_label.xml', + 'report/fo_visitor_label.xml', + 'report/visitors_report.xml', + 'security/fo_security.xml', + 'security/ir.model.access.csv', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, +} diff --git a/front_office_management/models/__init__.py b/front_office_management/models/__init__.py new file mode 100644 index 000000000..21aed2873 --- /dev/null +++ b/front_office_management/models/__init__.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Anusha P P() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +from . import fo_visitor +from . import fo_property_counter +from . import fo_visit + + + + + + diff --git a/front_office_management/models/fo_property_counter.py b/front_office_management/models/fo_property_counter.py new file mode 100644 index 000000000..ac9b503e3 --- /dev/null +++ b/front_office_management/models/fo_property_counter.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Maintainer: Cybrosys Technologies () +############################################################################## + + +from odoo import models, fields, api,_ +from odoo.exceptions import UserError + + +class VisitDetails(models.Model): + _name = 'fo.property.counter' + _inherit = 'mail.thread' + _rec_name = 'employee' + _description = 'Property Details' + + employee = fields.Many2one('hr.employee', string="Employee", required=True) + date = fields.Date(string="Date", required=True) + visitor_belongings = fields.One2many('fo.belongings', 'belongings_id_fov_employee', string="Personal Belongings", + copy=False) + state = fields.Selection([ + ('draft', 'Draft'), + ('prop_in', 'Taken In'), + ('prop_out', 'Taken out'), + ('cancel', 'Cancelled'), + ], track_visibility='onchange', default='draft', + help='If the employee taken the belongings to the company change state to ""Taken In""' + 'when he/she leave office change the state to ""Taken out""') + + @api.one + def action_cancel(self): + self.state = "cancel" + + @api.one + def action_prop_in(self): + count = 0 + number = 0 + for data in self.visitor_belongings: + if not data.property_count: + raise UserError(_('Please Add the Count.')) + if data.permission == '1': + count += 1 + number = data.number + if number == count: + raise UserError(_('No property can be taken in.')) + else: + self.state = 'prop_in' + + @api.multi + def action_prop_out(self): + self.state = "prop_out" + + + + + diff --git a/front_office_management/models/fo_visit.py b/front_office_management/models/fo_visit.py new file mode 100644 index 000000000..120f9f8d6 --- /dev/null +++ b/front_office_management/models/fo_visit.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Maintainer: Cybrosys Technologies () +############################################################################## + +import datetime +from odoo import models, fields, api, _ + + +class VisitDetails(models.Model): + _name = 'fo.visit' + _inherit = ['mail.thread'] + _description = 'Visit' + + name = fields.Char(string="sequence", default=lambda self: _('New')) + visitor = fields.Many2one("fo.visitor", string='Visitor') + phone = fields.Char(string="Phone", required=True) + email = fields.Char(string="Email", required=True) + reason = fields.Many2many('fo.purpose', string='Purpose Of Visit', required=True, + help='Enter the reason for visit') + visitor_belongings = fields.One2many('fo.belongings', 'belongings_id_fov_visitor', string="Personal Belongings", + help='Add the belongings details here.') + check_in_date = fields.Datetime(string="Check In Time", help='Visitor check in time automatically' + ' fills when he checked in to the office.') + check_out_date = fields.Datetime(string="Check Out Time", help='Visitor check out time automatically ' + 'fills when he checked out from the office.') + visiting_person = fields.Many2one('hr.employee', string="Meeting With") + department = fields.Many2one('hr.department', string="Department") + state = fields.Selection([ + ('draft', 'Draft'), + ('check_in', 'Checked In'), + ('check_out', 'Checked Out'), + ('cancel', 'Cancelled'), + ], track_visibility='onchange', default='draft') + + @api.model + def create(self, vals): + if vals: + vals['name'] = self.env['ir.sequence'].next_by_code('fo.visit') or _('New') + result = super(VisitDetails, self).create(vals) + return result + + @api.one + def action_cancel(self): + self.state = "cancel" + + @api.one + def action_check_in(self): + self.state = "check_in" + self.check_in_date = datetime.datetime.now() + + @api.multi + def action_check_out(self): + self.state = "check_out" + self.check_out_date = datetime.datetime.now() + + @api.onchange('visitor') + def visitor_details(self): + if self.visitor: + if self.visitor.phone: + self.phone = self.visitor.phone + if self.visitor.email: + self.email = self.visitor.email + + @api.onchange('visiting_person') + def get_employee_dpt(self): + if self.visiting_person: + self.department = self.visiting_person.department_id + + +class PersonalBelongings(models.Model): + _name = 'fo.belongings' + + property_name = fields.Char(string="Property", help='Employee belongings name') + property_count = fields.Char(string="Count", help='Count of property') + number = fields.Integer(compute='get_number', store=True, string="Sl") + belongings_id_fov_visitor = fields.Many2one('fo.visit', string="Belongings") + belongings_id_fov_employee = fields.Many2one('fo.property.counter', string="Belongings") + permission = fields.Selection([ + ('0', 'Allowed'), + ('1', 'Not Allowed'), + ('2', 'Allowed With Permission'), + ], 'Permission', required=True, index=True, default='0', track_visibility='onchange') + + @api.multi + @api.depends('belongings_id_fov_visitor', 'belongings_id_fov_employee') + def get_number(self): + for visit in self.mapped('belongings_id_fov_visitor'): + number = 1 + for line in visit.visitor_belongings: + line.number = number + number += 1 + for visit in self.mapped('belongings_id_fov_employee'): + number = 1 + for line in visit.visitor_belongings: + line.number = number + number += 1 + + +class VisitPurpose(models.Model): + _name = 'fo.purpose' + + name = fields.Char(string='Purpose', required=True, help='Meeting purpose in short term.eg:Meeting.') + description = fields.Text(string='Description Of Purpose', help='Description for the Purpose.') + + + + + + diff --git a/front_office_management/models/fo_visitor.py b/front_office_management/models/fo_visitor.py new file mode 100644 index 000000000..280e8738d --- /dev/null +++ b/front_office_management/models/fo_visitor.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Maintainer: Cybrosys Technologies () +############################################################################## + +from odoo import models, fields, api + + +class VisitorDetails(models.Model): + _name = 'fo.visitor' + + name = fields.Char(string="Visitor", required=True) + visitor_image = fields.Binary(string='Image', attachment=True) + street = fields.Char(string="Street") + street2 = fields.Char(string="Street2") + zip = fields.Char(change_default=True) + city = fields.Char() + state_id = fields.Many2one("res.country.state", string='State', ondelete='restrict') + country_id = fields.Many2one('res.country', string='Country', ondelete='restrict') + phone = fields.Char(string="Phone", required=True) + email = fields.Char(string="Email", required=True) + id_proof = fields.Many2one('id.proof', string="ID Proof") + id_proof_no = fields.Char(string="ID Number", help='Id proof number') + company_info = fields.Many2one('res.partner', string="Company", help='Visiting persons company details') + visit_count = fields.Integer(compute='_no_visit_count', string='# Visits') + + _sql_constraints = [ + ('field_uniq_email_and_id_proof', 'unique (email,id_proof)', "Please give the correct data !"), + ] + + @api.multi + def _no_visit_count(self): + data = self.env['fo.visit'].search([('visitor', '=', self.ids), ('state', '!=', 'cancel')]).ids + self.visit_count = len(data) + + +class VisitorProof(models.Model): + _name = 'id.proof' + _rec_name = 'id_proof' + + id_proof = fields.Char(string="Name") + code = fields.Char(string="Code") + + + + + + + + diff --git a/front_office_management/report/fo_property_label.xml b/front_office_management/report/fo_property_label.xml new file mode 100644 index 000000000..892bcc514 --- /dev/null +++ b/front_office_management/report/fo_property_label.xml @@ -0,0 +1,57 @@ + + + + + + \ No newline at end of file diff --git a/front_office_management/report/fo_visitor_label.xml b/front_office_management/report/fo_visitor_label.xml new file mode 100644 index 000000000..39f9e1060 --- /dev/null +++ b/front_office_management/report/fo_visitor_label.xml @@ -0,0 +1,69 @@ + + + + + + \ No newline at end of file diff --git a/front_office_management/report/report.xml b/front_office_management/report/report.xml new file mode 100644 index 000000000..129d9a6a1 --- /dev/null +++ b/front_office_management/report/report.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/front_office_management/report/visitors_report.xml b/front_office_management/report/visitors_report.xml new file mode 100644 index 000000000..eade5633b --- /dev/null +++ b/front_office_management/report/visitors_report.xml @@ -0,0 +1,64 @@ + + + + + + \ No newline at end of file diff --git a/front_office_management/security/fo_security.xml b/front_office_management/security/fo_security.xml new file mode 100644 index 000000000..d0b1da4d1 --- /dev/null +++ b/front_office_management/security/fo_security.xml @@ -0,0 +1,17 @@ + + + + + + Reception + 0 + + + + + Receptionist + + + + + \ No newline at end of file diff --git a/front_office_management/security/ir.model.access.csv b/front_office_management/security/ir.model.access.csv new file mode 100644 index 000000000..9caaabf7f --- /dev/null +++ b/front_office_management/security/ir.model.access.csv @@ -0,0 +1,14 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_fo_visit_receptionist,fo.visit,model_fo_visit,front_office_management.group_receptionist,1,1,1,1 +access_fo_visitor_receptionist,fo_visitor,model_fo_visitor,front_office_management.group_receptionist,1,1,1,1 +access_fo_belongings_receptionist,fo.belongings,model_fo_belongings,front_office_management.group_receptionist,1,1,1,1 +access_id_proof_receptionist,id.proof,model_id_proof,front_office_management.group_receptionist,1,1,1,1 +access_fo_property_counter_receptionist,fo.property.counter,model_fo_property_counter,front_office_management.group_receptionist,1,1,1,1 +access_fo_purpose_receptionist,fo.purpose,model_fo_purpose,front_office_management.group_receptionist,1,1,1,1 + + + + + + + diff --git a/front_office_management/static/description/banner.jpg b/front_office_management/static/description/banner.jpg new file mode 100644 index 000000000..e9b673984 Binary files /dev/null and b/front_office_management/static/description/banner.jpg differ diff --git a/front_office_management/static/description/belongings.png b/front_office_management/static/description/belongings.png new file mode 100644 index 000000000..acbbfadf1 Binary files /dev/null and b/front_office_management/static/description/belongings.png differ diff --git a/front_office_management/static/description/cybro_logo.png b/front_office_management/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/front_office_management/static/description/cybro_logo.png differ diff --git a/front_office_management/static/description/icon.png b/front_office_management/static/description/icon.png new file mode 100644 index 000000000..8b7ae409c Binary files /dev/null and b/front_office_management/static/description/icon.png differ diff --git a/front_office_management/static/description/index.html b/front_office_management/static/description/index.html new file mode 100644 index 000000000..b2fb5a2fa --- /dev/null +++ b/front_office_management/static/description/index.html @@ -0,0 +1,185 @@ +
+
+

Front Office Management

+

Manages Visitors and Employee Belongings

+

Cybrosys Technologies

+
+
+

Features:

+
+ Manage visitors.
+ Issue Visitor Pass.
+ Keep Check in, Check out Details of Visitors.
+ Manage Visitor Belongings.
+ Print Report Of visitor.
+ Manage Employee Belongings.
+ Print Property Label.
+
+
+
+ +
+
+
+

Overview

+

+ This app will help you to manage the visitors coming to your office by issuing entry passes and handling their belongings. + The app can also manage the belongings of your employees. +

+
+
+
+ +
+
+
+

+

Visitors

+

+

+
+ Create visitors. +
+ +
+
+
+
+ +
+
+
+

+

Visits

+

+
+
+ Add visiting details. +
+ +
+
+
+
+ +
+
+
+

+

Visitor Pass

+

+
+
+ Go to Visitor Management -> Visits -> Print -> Visitor Pass +
+ +
+
+
+
+ +
+
+
+

+

Visitor Report

+

+
+
+ Go to Visitor Management -> Visits -> Print -> Visitors Report +
+ +
+
+
+
+ +
+
+
+

+

Today's Visits

+

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

+

Employee Belongings

+

+
+
+ Here you can specify the field 'Permission' with the values of Allowed,Not Allowed and Allowed with permission. +
+ +
+
+
+
+ +
+
+
+

+

Property Label

+

+
+
+ Print the properties name that are not allowed to enter to the office. +
+ +
+
+
+
+ +
+
+
+

+

Receptionist

+

+
+
+ We can set 'Receptionist' access from users form. +
+ +
+
+
+
+ +
+

Need Any Help?

+ +
+ diff --git a/front_office_management/static/description/label.png b/front_office_management/static/description/label.png new file mode 100644 index 000000000..9de50b5ef Binary files /dev/null and b/front_office_management/static/description/label.png differ diff --git a/front_office_management/static/description/pass.png b/front_office_management/static/description/pass.png new file mode 100644 index 000000000..eaeec483b Binary files /dev/null and b/front_office_management/static/description/pass.png differ diff --git a/front_office_management/static/description/report.png b/front_office_management/static/description/report.png new file mode 100644 index 000000000..b444c6cf6 Binary files /dev/null and b/front_office_management/static/description/report.png differ diff --git a/front_office_management/static/description/todays.png b/front_office_management/static/description/todays.png new file mode 100644 index 000000000..810412900 Binary files /dev/null and b/front_office_management/static/description/todays.png differ diff --git a/front_office_management/static/description/user.png b/front_office_management/static/description/user.png new file mode 100644 index 000000000..d807f163e Binary files /dev/null and b/front_office_management/static/description/user.png differ diff --git a/front_office_management/static/description/visit.png b/front_office_management/static/description/visit.png new file mode 100644 index 000000000..339627c96 Binary files /dev/null and b/front_office_management/static/description/visit.png differ diff --git a/front_office_management/static/description/visitor.png b/front_office_management/static/description/visitor.png new file mode 100644 index 000000000..ebb9d0219 Binary files /dev/null and b/front_office_management/static/description/visitor.png differ diff --git a/front_office_management/views/fo_property_counter.xml b/front_office_management/views/fo_property_counter.xml new file mode 100644 index 000000000..ec5804e3d --- /dev/null +++ b/front_office_management/views/fo_property_counter.xml @@ -0,0 +1,112 @@ + + + + + Property Counter + fo.property.counter + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+ + + Property Counter + fo.property.counter + + + + + + + + + + + Property Counter + fo.property.counter + search + + + + + + + + + + + + + + + + + + Property Counter + fo.property.counter + form + tree,form + +

Record Personal Belongings. +

+
+
+ + + +
+
\ No newline at end of file diff --git a/front_office_management/views/fo_visit.xml b/front_office_management/views/fo_visit.xml new file mode 100644 index 000000000..7dd78a291 --- /dev/null +++ b/front_office_management/views/fo_visit.xml @@ -0,0 +1,208 @@ + + + + + Visits + fo.visit + +
+
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+
+
+
+ + + Visits + fo.visit + + + + + + + + + + + + Visits + fo.visit + search + + + + + + + + + + + + + + + + + + Visits + fo.visit + form + tree,form + +

Create Visits. +

+

+ The check in time will be automatically filled when the visitor check in to the office. +

+

+ The check out time automatically filled when the visitor check out from office. +

+
+
+ + + Today's Visits + fo.visit + form + tree,form + [('check_in_date', '>=',((context_today()-datetime.timedelta(days=0)).strftime('%Y-%m-%d 00:00:00'))), + ('check_in_date', '<=',((context_today()-datetime.timedelta(days=0)).strftime('%Y-%m-%d 23:59:59')))] + + + + + Visits + fo.visit + VID + 3 + + + + + Belongings + fo.belongings + +
+ + + + + + + + + + +
+
+
+ + + ID Proof + id.proof + +
+ + + + + + + + + + +
+
+
+ + + + + Visiting Purpose + fo.purpose + +
+ + + + + + + + + + +
+
+
+
+
\ No newline at end of file diff --git a/front_office_management/views/fo_visitor.xml b/front_office_management/views/fo_visitor.xml new file mode 100644 index 000000000..d399bbc01 --- /dev/null +++ b/front_office_management/views/fo_visitor.xml @@ -0,0 +1,139 @@ + + + + + Visitors + fo.visitor + +
+ +
+ +
+ +
+

+ + + + +
+ +
+

+
+ + + + + + + + + + +
+
+
+
+ + + fo.visitor.kanban + fo.visitor + + + + + +
+
+ +
+
+ +
    +
  • Name :
  • +
  • Phone:
  • +
+
+
+
+
+
+
+
+
+ + Visitors + fo.visitor + search + + + + + + + + + + + + + + + + + + + Visitors + fo.visitor + tree + + + + + + + + + + + Visitors + ir.actions.act_window + fo.visitor + kanban,tree,form + form + + +

+ Click to Create New Visitor. +

+
+
+ + + + + + + +
+
\ No newline at end of file