diff --git a/insurance_management_cybro/README.rst b/insurance_management_cybro/README.rst new file mode 100644 index 000000000..00144fd2a --- /dev/null +++ b/insurance_management_cybro/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Insurance Management +==================== +This module will used for Insurance Management & Operations. + + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: Niyas Raphy@cybrosys + Sreejith P @cybrosys + Version 13: Nimisha Murali@cybrosys + +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 `Our Website `__ + +Further information +=================== +HTML Description: ``__ + + diff --git a/insurance_management_cybro/__init__.py b/insurance_management_cybro/__init__.py new file mode 100755 index 000000000..e48f2d890 --- /dev/null +++ b/insurance_management_cybro/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# 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/insurance_management_cybro/__manifest__.py b/insurance_management_cybro/__manifest__.py new file mode 100755 index 000000000..30c4d6ed2 --- /dev/null +++ b/insurance_management_cybro/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# 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': 'Insurance Management', + 'version': '13.0.1.0.0', + 'summary': """Insurance Management & Operations""", + 'description': """Insurance Management""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'category': 'Industries', + 'depends': ['base', 'account'], + 'license': 'AGPL-3', + 'data': [ + 'views/insurance_details.xml', + 'views/claim_details.xml', + 'views/employee_details.xml', + 'views/policy_management.xml', + 'views/insurance_sequence.xml', + 'views/insurance_management.xml', + 'security/ir.model.access.csv', + ], + 'demo': [], + 'images': ['static/description/banner.png'], + 'installable': True, + 'application': True, + 'auto_install': False, +} + diff --git a/insurance_management_cybro/doc/RELEASE_NOTES.md b/insurance_management_cybro/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..e9755a48e --- /dev/null +++ b/insurance_management_cybro/doc/RELEASE_NOTES.md @@ -0,0 +1,9 @@ +## Module + +#### 17.10.2019 +#### Version 13.0.1.0.0 +#### ADD +Initial commit for Insurance Management + + + diff --git a/insurance_management_cybro/models/__init__.py b/insurance_management_cybro/models/__init__.py new file mode 100755 index 000000000..bbd1b7465 --- /dev/null +++ b/insurance_management_cybro/models/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# 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 insurance_model +from . import claim_details +from . import employee_details +from . import policy_details diff --git a/insurance_management_cybro/models/claim_details.py b/insurance_management_cybro/models/claim_details.py new file mode 100755 index 000000000..fa21314a6 --- /dev/null +++ b/insurance_management_cybro/models/claim_details.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# 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 models, fields, api, _ + + +class ClaimDetails(models.Model): + _name = 'claim.details' + + name = fields.Char(string='Name', required=True, copy=False, readonly=True, index=True, + default=lambda self: _('New')) + name_2 = fields.Char(string='Name 2', required=True, copy=False, readonly=True, index=True, + default=lambda self: _('New')) + insurance_id = fields.Many2one('insurance.details', required=True) + partner_id = fields.Many2one(related='insurance_id.partner_id', string='Customer', readonly=True) + policy_id = fields.Many2one(related='insurance_id.policy_id', string='Policy', readonly=True) + employee_id = fields.Many2one(related='insurance_id.employee_id', string='Agent', readonly=True) + amount = fields.Float(related='insurance_id.amount', string='Amount') + date_claimed = fields.Date(string='Date Applied', default=fields.Date.today()) + invoice_id = fields.Many2one('account.move', string='Invoiced', readonly=True, copy=False) + note_field = fields.Html(string='Comment') + + @api.model + def create(self, vals): + if vals.get('name', 'New') == 'New': + vals['name'] = self.env['ir.sequence'].next_by_code('claim.details') or 'New' + return super(ClaimDetails, self).create(vals) + + + def create_invoice(self): + if not self.invoice_id: + invoice_val = self.env['account.move'].create({ + 'type': 'in_invoice', + 'partner_id': self.partner_id.id, + 'invoice_user_id': self.env.user.id, + 'claim_id': self.id, + 'invoice_origin': self.name, + 'invoice_line_ids': [(0, 0, { + 'name': 'Invoice For Insurance Claim', + 'quantity': 1, + 'price_unit': self.amount, + 'account_id': 41, + })], + }) + self.invoice_id = invoice_val diff --git a/insurance_management_cybro/models/employee_details.py b/insurance_management_cybro/models/employee_details.py new file mode 100755 index 000000000..39bc27884 --- /dev/null +++ b/insurance_management_cybro/models/employee_details.py @@ -0,0 +1,80 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# 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 models, fields, api, _ +from odoo.exceptions import UserError + + +class EmployeeDetails(models.Model): + _name = 'employee.details' + + name = fields.Char(string='Name', required=True) + related_partner = fields.Many2one('res.users', string='Related User', copy=False) + sex = fields.Selection([('male', 'Male'), ('female', 'Female')]) + phone = fields.Float(string='Phone Number', size=15, digits=(15, 0)) + salary_type = fields.Selection([('fixed', 'Fixed'), ('commission', 'Commission'), ('both', 'Both')], + default='commission', required=True) + base_salary = fields.Integer(string='Base Salary') + last_salary = fields.Date(string='Last Payment On', copy=False) + insurance_ids = fields.One2many('insurance.details', 'employee_id', string='Last Payment On', readonly=True) + note_field = fields.Html(string='Comment') + invoice_id = fields.Many2one('account.move', string='Last payment', copy=False, readonly=True) + + + def salary_payment(self): + if self.invoice_id: + if self.invoice_id.state == 'draft': + raise UserError(_("You Must validate last payment made in order to create a new payment")) + amount = 0 + if self.base_salary == 0: + raise UserError(_("Amount should be greater than zero")) + if self.salary_type == 'fixed': + amount = self.base_salary + elif self.salary_type == 'commission': + for ins in self.insurance_ids: + if self.last_salary: + if ins.date_start > self.last_salary: + amount += (ins.commission_rate * ins.amount)/100 + else: + amount = self.base_salary + for ins in self.insurance_ids: + if ins.date_start > self.last_salary: + amount += (ins.commission_rate * ins.amount) / 100 + + + invoice_date = self.env['account.move'].create({ + 'type': 'in_invoice', + 'partner_id': self.related_partner.partner_id.id, + 'invoice_user_id': self.env.user.id, + 'claim_id': self.id, + 'invoice_origin': self.name, + 'invoice_line_ids': [(0, 0, { + 'name': 'Invoice For Insurance Claim', + 'quantity': 1, + 'price_unit': amount, + 'account_id': 41, + })], + }) + self.write({ + 'invoice_id': invoice_date.id, + 'last_salary': fields.Date.today() + }) diff --git a/insurance_management_cybro/models/insurance_model.py b/insurance_management_cybro/models/insurance_model.py new file mode 100755 index 000000000..d96ccdb8f --- /dev/null +++ b/insurance_management_cybro/models/insurance_model.py @@ -0,0 +1,89 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# 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 models, fields, api, _ +from odoo.exceptions import UserError + + +class InsuranceDetails(models.Model): + _name = 'insurance.details' + + name = fields.Char(string='Name', required=True, copy=False, readonly=True, index=True, + default=lambda self: _('New')) + partner_id = fields.Many2one('res.partner', string='Customer', required=True) + date_start = fields.Date(string='Date Started', default=fields.Date.today(), required=True) + close_date = fields.Date(string='Date Closed') + invoice_ids = fields.One2many('account.move', 'insurance_id', string='Invoices', readonly=True) + employee_id = fields.Many2one('employee.details', string='Agent', required=True) + commission_rate = fields.Float(string='Commission Percentage') + policy_id = fields.Many2one('policy.details', string='Policy', required=True) + amount = fields.Float(related='policy_id.amount', string='Amount') + state = fields.Selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ('closed', 'Closed')], + required=True, default='draft') + hide_inv_button = fields.Boolean(copy=False) + note_field = fields.Html(string='Comment') + + + def confirm_insurance(self): + if self.amount > 0: + self.state = 'confirmed' + self.hide_inv_button = True + else: + raise UserError(_("Amount should be Greater than Zero")) + + + def create_invoice(self): + created_invoice=self.env['account.move'].create({ + 'type': 'out_invoice', + 'partner_id': self.partner_id.id, + 'invoice_user_id': self.env.user.id, + 'invoice_origin': self.name, + 'invoice_line_ids': [(0, 0, { + 'name': 'Invoice For Insurance', + 'quantity': 1, + 'price_unit': self.amount, + 'account_id': 41, + })], + }) + self.invoice_ids = created_invoice + if self.policy_id.payment_type == 'fixed': + self.hide_inv_button = False + + def close_insurance(self): + for records in self.invoice_ids: + if records.state == 'paid': + raise UserError(_("All invoices must be Paid")) + self.state = 'closed' + self.hide_inv_button = False + + @api.model + def create(self, vals): + if vals.get('name', 'New') == 'New': + vals['name'] = self.env['ir.sequence'].next_by_code('insurance.details') or 'New' + return super(InsuranceDetails, self).create(vals) + + +class AccountInvoiceRelate(models.Model): + _inherit = 'account.move' + + insurance_id = fields.Many2one('insurance.details', string='Insurance') + claim_id = fields.Many2one('claim.details', string='Insurance') diff --git a/insurance_management_cybro/models/policy_details.py b/insurance_management_cybro/models/policy_details.py new file mode 100755 index 000000000..e6c1ccf03 --- /dev/null +++ b/insurance_management_cybro/models/policy_details.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions(odoo@cybrosys.com) +# +# 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 models, fields + + +class PolicyDetails(models.Model): + _name = 'policy.details' + + name = fields.Char(string='Name', required=True) + policy_type = fields.Many2one('policy.type', string='Policy Type', required=True) + payment_type = fields.Selection([('fixed', 'Fixed'), ('installment', 'Installment')], + required=True, default='fixed') + amount = fields.Float(string='Amount', required=True) + policy_duration = fields.Integer(string='Duration in Days', required=True) + note_field = fields.Html(string='Comment') + + +class PolicyType(models.Model): + _name = 'policy.type' + + name = fields.Char(string='Name') diff --git a/insurance_management_cybro/security/ir.model.access.csv b/insurance_management_cybro/security/ir.model.access.csv new file mode 100755 index 000000000..4635a099d --- /dev/null +++ b/insurance_management_cybro/security/ir.model.access.csv @@ -0,0 +1,7 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_claim_details,access.claim.details,model_claim_details,base.group_user,1,1,1,1 +access_employee_details,access.employee.details,model_employee_details,base.group_user,1,1,1,1 +access_insurance_details,access.insurance.details,model_insurance_details,base.group_user,1,1,1,1 +access_policy_details,access.policy.details,model_policy_details,base.group_user,1,1,1,1 +access_policy_type,access.policy.type,model_policy_type,base.group_user,1,1,1,1 +access_account_move,access.account.move,model_account_move,base.group_user,1,1,1,1 diff --git a/insurance_management_cybro/static/description/banner.png b/insurance_management_cybro/static/description/banner.png new file mode 100644 index 000000000..10dca674c Binary files /dev/null and b/insurance_management_cybro/static/description/banner.png differ diff --git a/insurance_management_cybro/static/description/cybro_logo.png b/insurance_management_cybro/static/description/cybro_logo.png new file mode 100755 index 000000000..bb309114c Binary files /dev/null and b/insurance_management_cybro/static/description/cybro_logo.png differ diff --git a/insurance_management_cybro/static/description/icon.png b/insurance_management_cybro/static/description/icon.png new file mode 100644 index 000000000..61b30530f Binary files /dev/null and b/insurance_management_cybro/static/description/icon.png differ diff --git a/insurance_management_cybro/static/description/index.html b/insurance_management_cybro/static/description/index.html new file mode 100755 index 000000000..cc1d2601c --- /dev/null +++ b/insurance_management_cybro/static/description/index.html @@ -0,0 +1,395 @@ +
+
+

+ Insurance Management +

+

+ Manage Insurance Business easily +

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

+ Overview +

+

+ Aims Insurance business. It allows you to manage all kind of insurances in a practical way. +

+
+
+
+
+

+ Features +

+

+ + Create insurance policies for customers. +

+

+ + Manage insurance claims and details. +

+ + Manage agents salary and commission. +

+

+ + Create accounting entries for all details. +

+
+
+
+
+

+ Screenshots +

+

+ + Insurance Management System +

+
+
    +
  • + Create insurance policies for customers. +
  • +
  • + Option to create multiple or single insurance based on policy. +
  • +
  • + Monitor payment details. +
  • +
+
+
+ +
+

+ + Claims Management System +

+
    +
  • + Create and manage customer claims for the insurances. +
  • +
  • + Create payment from the same form. +
  • +
+
+ +
+

+ + Employee Management +

+
    +
  • + Create agent details. +
  • +
  • + Automated creation of salary or commission. +
  • +
  • + Manage payment details. +
  • +
+
+ +
+

+ + Create Policy +

+
    +
  • + Create All types of policies from here +
  • +
+
+ +
+

+ + Customer Details Forms +

+
+ +
+
+
+ +
+
+ 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/insurance_management_cybro/static/description/insurance_1.png b/insurance_management_cybro/static/description/insurance_1.png new file mode 100755 index 000000000..d03a6c62c Binary files /dev/null and b/insurance_management_cybro/static/description/insurance_1.png differ diff --git a/insurance_management_cybro/static/description/insurance_2.png b/insurance_management_cybro/static/description/insurance_2.png new file mode 100755 index 000000000..31651295e Binary files /dev/null and b/insurance_management_cybro/static/description/insurance_2.png differ diff --git a/insurance_management_cybro/static/description/insurance_3.png b/insurance_management_cybro/static/description/insurance_3.png new file mode 100755 index 000000000..b4bf07819 Binary files /dev/null and b/insurance_management_cybro/static/description/insurance_3.png differ diff --git a/insurance_management_cybro/static/description/insurance_4.png b/insurance_management_cybro/static/description/insurance_4.png new file mode 100755 index 000000000..3a57b3525 Binary files /dev/null and b/insurance_management_cybro/static/description/insurance_4.png differ diff --git a/insurance_management_cybro/static/description/insurance_5.png b/insurance_management_cybro/static/description/insurance_5.png new file mode 100755 index 000000000..aea4ab4c4 Binary files /dev/null and b/insurance_management_cybro/static/description/insurance_5.png differ diff --git a/insurance_management_cybro/views/claim_details.xml b/insurance_management_cybro/views/claim_details.xml new file mode 100755 index 000000000..05c835610 --- /dev/null +++ b/insurance_management_cybro/views/claim_details.xml @@ -0,0 +1,69 @@ + + + + + + Claim Details + claim.details + +
+
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
+
+
+
+ + + Claim Details + claim.details + + + + + + + + + + + + + Claim Management + claim.details + tree,form + +

+ You have'nt created any claims yet. +

+
+
+
+ +
\ No newline at end of file diff --git a/insurance_management_cybro/views/employee_details.xml b/insurance_management_cybro/views/employee_details.xml new file mode 100755 index 000000000..fda1e96b4 --- /dev/null +++ b/insurance_management_cybro/views/employee_details.xml @@ -0,0 +1,70 @@ + + + + + + Employee Details + employee.details + +
+
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + Employee Details + employee.details + + + + + + + + + + + + Employee Management + employee.details + tree,form + +

+ You have'nt created any employee yet. +

+
+
+
+ +
\ No newline at end of file diff --git a/insurance_management_cybro/views/insurance_details.xml b/insurance_management_cybro/views/insurance_details.xml new file mode 100755 index 000000000..a02cf1bb6 --- /dev/null +++ b/insurance_management_cybro/views/insurance_details.xml @@ -0,0 +1,77 @@ + + + + + + Insurance Details + insurance.details + +
+
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + Insurance Details + insurance.details + + + + + + + + + + + + + Insurance Management + insurance.details + tree,form + +

+ You have'nt created any insurance yet. +

+
+
+
+ +
\ No newline at end of file diff --git a/insurance_management_cybro/views/insurance_management.xml b/insurance_management_cybro/views/insurance_management.xml new file mode 100755 index 000000000..86ee073ce --- /dev/null +++ b/insurance_management_cybro/views/insurance_management.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + diff --git a/insurance_management_cybro/views/insurance_sequence.xml b/insurance_management_cybro/views/insurance_sequence.xml new file mode 100755 index 000000000..ecd30c2a5 --- /dev/null +++ b/insurance_management_cybro/views/insurance_sequence.xml @@ -0,0 +1,19 @@ + + + + + Insurance Details + insurance.details + INS/ + 3 + + + + Claim Details + claim.details + CLM/ + 3 + + + + \ No newline at end of file diff --git a/insurance_management_cybro/views/policy_management.xml b/insurance_management_cybro/views/policy_management.xml new file mode 100755 index 000000000..382a603da --- /dev/null +++ b/insurance_management_cybro/views/policy_management.xml @@ -0,0 +1,58 @@ + + + + + Policy Details + policy.details + +
+ +
+

+ +

+
+ + + + + + + + + + + + + + + +
+
+
+
+ + Policy Details + policy.details + + + + + + + + + + + + Policy Management + policy.details + tree,form + +

+ You have'nt created any policy yet. +

+
+
+
+
\ No newline at end of file diff --git a/odoo-debrand/README.rst b/odoo-debrand/README.rst new file mode 100644 index 000000000..21a39ea56 --- /dev/null +++ b/odoo-debrand/README.rst @@ -0,0 +1,55 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +=============== +Odoo Debranding +=============== + +Debranding of odoo with the given configurations under Website Admin -> Debranding Configurations. +Will replace: + + - Page Title + - Odoo from Popups + - User Drop down Odoo links + - Website Title + - POS Odoo logo replaced by company logo + - Odoo label from Dialogues + - Odoo Database Selector Logo, Labels + +Installation +============ +- www.odoo.com/documentation/13.0/setup/install.html +- Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: + V13 Atul Varma + +Contacts +-------- +* Mail Contact : odoo@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 `Our Website `__ + +Further information +=================== +HTML Description: ``__ + + diff --git a/odoo-debrand/__init__.py b/odoo-debrand/__init__.py new file mode 100644 index 000000000..0bc179519 --- /dev/null +++ b/odoo-debrand/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies() +# Author: Tintuk Tomin() +# +# 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 controllers +from . import models diff --git a/odoo-debrand/__manifest__.py b/odoo-debrand/__manifest__.py new file mode 100644 index 000000000..dc5d0a8ec --- /dev/null +++ b/odoo-debrand/__manifest__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies() +# Author: Tintuk Tomin() +# +# 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': "Odoo Debranding", + 'version': "13.0.1.0.0", + 'summary': """Debrand Odoo""", + 'description': """Debrand Odoo,Debranding""", + 'author': "Cybrosys Techno Solutions", + 'company': "Cybrosys Techno Solutions", + 'maintainer': "Cybrosys Techno Solutions", + 'website': "https://cybrosys.com/", + 'category': 'Tools', + 'depends': ['base', 'im_livechat', 'website'], + 'data': [ + 'views/views.xml' + ], + 'qweb': ["static/src/xml/base.xml"], + 'images': ['static/description/banner.png'], + 'license': "AGPL-3", + 'installable': True, + 'application': False +} diff --git a/odoo-debrand/controllers/__init__.py b/odoo-debrand/controllers/__init__.py new file mode 100644 index 000000000..8a47105f1 --- /dev/null +++ b/odoo-debrand/controllers/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Tintuk Tomin() +# +# 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 controllers \ No newline at end of file diff --git a/odoo-debrand/controllers/controllers.py b/odoo-debrand/controllers/controllers.py new file mode 100644 index 000000000..075794057 --- /dev/null +++ b/odoo-debrand/controllers/controllers.py @@ -0,0 +1,146 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies( +# ). +# Author: Tintuk Tomin() +# +# 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 . +# +############################################################################# + +import base64 +import functools +import io +import json + +from odoo.http import request +from odoo.modules import get_resource_path +from odoo.tools.mimetypes import guess_mimetype + +import jinja2 +import odoo +import os +import sys +from odoo import http +from odoo.addons.web.controllers import main +from odoo.addons.web.controllers.main import Binary +from odoo.addons.web.controllers.main import Database + +if hasattr(sys, 'frozen'): + # When running on compiled windows binary, we don't have access to + # package loader. + path = os.path.realpath( + os.path.join(os.path.dirname(__file__), '..', 'views')) + loader = jinja2.FileSystemLoader(path) +else: + loader = jinja2.PackageLoader('odoo.addons.odoo-debrand', "views") +env = main.jinja2.Environment(loader=loader, autoescape=True) +env.filters["json"] = json.dumps +db_monodb = http.db_monodb +DBNAME_PATTERN = '^[a-zA-Z0-9][a-zA-Z0-9_.-]+$' + + +class BinaryCustom(Binary): + @http.route([ + '/web/binary/company_logo', + '/logo', + '/logo.png', + ], type='http', auth="none") + def company_logo(self, dbname=None, **kw): + imgname = 'logo' + imgext = '.png' + placeholder = functools.partial(get_resource_path, 'web', 'static', + 'src', 'img') + uid = None + if request.session.db: + dbname = request.session.db + uid = request.session.uid + elif dbname is None: + dbname = db_monodb() + + if not uid: + uid = odoo.SUPERUSER_ID + + if not dbname: + response = http.send_file(placeholder(imgname + imgext)) + else: + try: + # create an empty registry + registry = odoo.modules.registry.Registry(dbname) + with registry.cursor() as cr: + company = int(kw['company']) if kw and kw.get( + 'company') else False + if company: + cr.execute("""SELECT logo_web, write_date + FROM res_company + WHERE id = %s + """, (company,)) + else: + cr.execute("""SELECT c.logo_web, c.write_date + FROM res_users u + LEFT JOIN res_company c + ON c.id = u.company_id + WHERE u.id = %s + """, (uid,)) + row = cr.fetchone() + if row and row[0]: + image_base64 = base64.b64decode(row[0]) + image_data = io.BytesIO(image_base64) + mimetype = guess_mimetype(image_base64, + default='image/png') + imgext = '.' + mimetype.split('/')[1] + if imgext == '.svg+xml': + imgext = '.svg' + response = http.send_file(image_data, + filename=imgname + imgext, + mimetype=mimetype, + mtime=row[1]) + else: + response = http.send_file(placeholder('nologo.png')) + except Exception: + response = http.send_file(placeholder(imgname + imgext)) + + return response + + +class OdooDebrand(Database): + + def _render_template(self, **d): + + d.setdefault('manage', True) + d['insecure'] = odoo.tools.config.verify_admin_password('admin') + d['list_db'] = odoo.tools.config['list_db'] + d['langs'] = odoo.service.db.exp_list_lang() + d['countries'] = odoo.service.db.exp_list_countries() + d['pattern'] = DBNAME_PATTERN + website_id = request.env['website'].sudo().search([]) + d['website_name'] = website_id and website_id[0].name or '' + d['company_name'] = website_id and website_id[0].company_id.name or '' + d['favicon'] = website_id and website_id[0].favicon_url or '' + d['company_logo_url'] = website_id and website_id[ + 0].company_logo_url or '' + + # databases list + d['databases'] = [] + try: + d['databases'] = http.db_list() + d['incompatible_databases'] = odoo.service.db.list_db_incompatible( + d['databases']) + except odoo.exceptions.AccessDenied: + monodb = db_monodb() + if monodb: + d['databases'] = [monodb] + return env.get_template("database_manager_extend.html").render(d) diff --git a/odoo-debrand/doc/RELEASE_NOTES.md b/odoo-debrand/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..f61ef0545 --- /dev/null +++ b/odoo-debrand/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 17.10.2019 +#### Version 13.0.1.0.0 +#### ADD +Initial Commit for odoo-debrand diff --git a/odoo-debrand/models/__init__.py b/odoo-debrand/models/__init__.py new file mode 100644 index 000000000..8d2860c94 --- /dev/null +++ b/odoo-debrand/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies() +# Author: Tintuk Tomin() +# +# 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/odoo-debrand/models/models.py b/odoo-debrand/models/models.py new file mode 100644 index 000000000..38fe24cb0 --- /dev/null +++ b/odoo-debrand/models/models.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Tintuk Tomin() +# +# 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 models, fields, api, tools + + +class OdooDebrand(models.Model): + _inherit = "website" + + def get_company_logo(self): + self.company_logo_url ="/web/image/res.company/%s/logo"%(self.id) + + def get_favicon(self): + id = self.env['website'].sudo().search([]) + self.favicon_url ="/web/image/website/%s/favicon"%(id[0].id) + + favicon_url = fields.Text("Url", compute='get_favicon') + company_logo_url = fields.Text("Url", compute='get_company_logo') diff --git a/odoo-debrand/static/description/banner.png b/odoo-debrand/static/description/banner.png new file mode 100644 index 000000000..9220a9535 Binary files /dev/null and b/odoo-debrand/static/description/banner.png differ diff --git a/odoo-debrand/static/description/cybro_logo.png b/odoo-debrand/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/odoo-debrand/static/description/cybro_logo.png differ diff --git a/odoo-debrand/static/description/icon.png b/odoo-debrand/static/description/icon.png new file mode 100644 index 000000000..e2edaed6f Binary files /dev/null and b/odoo-debrand/static/description/icon.png differ diff --git a/odoo-debrand/static/description/images/checked.png b/odoo-debrand/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/odoo-debrand/static/description/images/checked.png differ diff --git a/odoo-debrand/static/description/images/cybrosys.png b/odoo-debrand/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/odoo-debrand/static/description/images/cybrosys.png differ diff --git a/odoo-debrand/static/description/images/debranding-01.png b/odoo-debrand/static/description/images/debranding-01.png new file mode 100644 index 000000000..bc26f0d71 Binary files /dev/null and b/odoo-debrand/static/description/images/debranding-01.png differ diff --git a/odoo-debrand/static/description/images/debranding-02.png b/odoo-debrand/static/description/images/debranding-02.png new file mode 100644 index 000000000..c466467a9 Binary files /dev/null and b/odoo-debrand/static/description/images/debranding-02.png differ diff --git a/odoo-debrand/static/description/images/debranding-03.png b/odoo-debrand/static/description/images/debranding-03.png new file mode 100644 index 000000000..5a614c5c5 Binary files /dev/null and b/odoo-debrand/static/description/images/debranding-03.png differ diff --git a/odoo-debrand/static/description/images/debranding-04.png b/odoo-debrand/static/description/images/debranding-04.png new file mode 100644 index 000000000..ffa4a31f0 Binary files /dev/null and b/odoo-debrand/static/description/images/debranding-04.png differ diff --git a/odoo-debrand/static/description/images/debranding-05.png b/odoo-debrand/static/description/images/debranding-05.png new file mode 100644 index 000000000..21ff53707 Binary files /dev/null and b/odoo-debrand/static/description/images/debranding-05.png differ diff --git a/odoo-debrand/static/description/images/debranding-06.png b/odoo-debrand/static/description/images/debranding-06.png new file mode 100644 index 000000000..83c08b650 Binary files /dev/null and b/odoo-debrand/static/description/images/debranding-06.png differ diff --git a/odoo-debrand/static/description/images/debranding_1.gif b/odoo-debrand/static/description/images/debranding_1.gif new file mode 100644 index 000000000..e113fb7a8 Binary files /dev/null and b/odoo-debrand/static/description/images/debranding_1.gif differ diff --git a/odoo-debrand/static/description/images/order_types_in_pos.png b/odoo-debrand/static/description/images/order_types_in_pos.png new file mode 100644 index 000000000..2554ded45 Binary files /dev/null and b/odoo-debrand/static/description/images/order_types_in_pos.png differ diff --git a/odoo-debrand/static/description/images/pos_book_order.gif b/odoo-debrand/static/description/images/pos_book_order.gif new file mode 100644 index 000000000..935190db4 Binary files /dev/null and b/odoo-debrand/static/description/images/pos_book_order.gif differ diff --git a/odoo-debrand/static/description/images/pos_book_order_youtube.png b/odoo-debrand/static/description/images/pos_book_order_youtube.png new file mode 100644 index 000000000..73767655a Binary files /dev/null and b/odoo-debrand/static/description/images/pos_book_order_youtube.png differ diff --git a/odoo-debrand/static/description/images/pos_combo_products.png b/odoo-debrand/static/description/images/pos_combo_products.png new file mode 100644 index 000000000..98673039e Binary files /dev/null and b/odoo-debrand/static/description/images/pos_combo_products.png differ diff --git a/odoo-debrand/static/description/images/pos_lot_expiry_warning.png b/odoo-debrand/static/description/images/pos_lot_expiry_warning.png new file mode 100644 index 000000000..ed9d045ca Binary files /dev/null and b/odoo-debrand/static/description/images/pos_lot_expiry_warning.png differ diff --git a/odoo-debrand/static/description/images/pos_product_addons.png b/odoo-debrand/static/description/images/pos_product_addons.png new file mode 100644 index 000000000..25d4d79f4 Binary files /dev/null and b/odoo-debrand/static/description/images/pos_product_addons.png differ diff --git a/odoo-debrand/static/description/images/pos_return.jpeg b/odoo-debrand/static/description/images/pos_return.jpeg new file mode 100644 index 000000000..874a6d32a Binary files /dev/null and b/odoo-debrand/static/description/images/pos_return.jpeg differ diff --git a/odoo-debrand/static/description/images/remove_orders.png b/odoo-debrand/static/description/images/remove_orders.png new file mode 100644 index 000000000..8096e2708 Binary files /dev/null and b/odoo-debrand/static/description/images/remove_orders.png differ diff --git a/odoo-debrand/static/description/index.html b/odoo-debrand/static/description/index.html new file mode 100644 index 000000000..dc9a4c126 --- /dev/null +++ b/odoo-debrand/static/description/index.html @@ -0,0 +1,401 @@ + +
cybrosys-logo
+ +
+
+
+

ODOO DEBRANDING

+

Debrand Odoo Back-end + Front-End .

+
+

Key Highlights

+
    +
  • checkModify database selector page
  • +
  • check Modify login page
  • +
  • check Remove Odoo's default favicon
  • +
  • check Updated "About" list
  • +
  • check Updated warning messages
  • +
  • check Page title modification
  • +
+ +
+
+
+
+ + + + + + +
+
+
+ + + +
+
+ +

Overview

+
+

+ Want to debrand your company website? Odoo Debranding module developed by Cybrosys Technologies helps you to change the aesthetic look of Odoo software via customizing them with Logo and other branding changes. The module helps you to change almost every area of Odoo visuals, delivering a brand new customized website.

+ +
+ +

Odoo Debranding

+
+
    + +
  • + checkAvailable in Odoo 13.0 community edition.
  • + +
  • + checkModify database selector page.
  • + +
  • + check Modify login page.
  • + +
  • + checkRemove Odoo's default favicon.
  • +
  • + checkUpdated warning messages.
  • +
  • + checkPage title modification.
  • + +
+
+ + + +
+ +
+

Screenshots

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

Video

+
+

Odoo debranding Demo

+ + +
+ Cybrosys Cover Video +
+ +
+
+ + + +
+
    + + +
+
+
+
+
+
+ +
+

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 / info@cybrosys.com

+ +
+
+

Contact Us

+ www.cybrosys.com +
+
+ +
+
+ + +
+
+
+ + + + +
+
+ +
+ + + + + + + + +
+
+
+
+ diff --git a/odoo-debrand/static/src/js/title.js b/odoo-debrand/static/src/js/title.js new file mode 100644 index 000000000..edc6697a2 --- /dev/null +++ b/odoo-debrand/static/src/js/title.js @@ -0,0 +1,111 @@ +odoo.define('odoo-debrand-11.title', function(require) { +"use strict"; + +var core = require('web.core'); +var utils = require('web.utils'); +var ajax = require('web.ajax'); +var Dialog = require('web.Dialog'); +var WebClient = require('web.AbstractWebClient'); +var CrashManager = require('web.CrashManager'); // We can import crash_manager also +var concurrency = require('web.concurrency'); +var mixins = require('web.mixins'); +var session = require('web.session'); +var QWeb = core.qweb; +var _t = core._t; +var _lt = core._lt; +var name = " "; + + +var map_title ={ + user_error: _lt('Warning'), + warning: _lt('Warning'), + access_error: _lt('Access Error'), + missing_error: _lt('Missing Record'), + validation_error: _lt('Validation Error'), + except_orm: _lt('Global Business Error'), + access_denied: _lt('Access Denied'), +}; + + var myWebClient = WebClient.include({ + init: function (parent) { + this._super(); + var obj = this; + this._rpc({ + fields: ['name',], + domain: [], + model: 'website', + method: 'search_read', + limit: 1, + context: session.user_context, + }) + .then(function (result) { + obj.set('title_part', {"zopenerp": result[0].name}); + }); + }, + start: function () { + this._super(); + this._rpc({ + fields: ['name',], + domain: [], + model: 'website', + method: 'search_read', + limit: 1, + context: session.user_context, + }) + .then(function(result){ + $("link[type='image/x-icon']").attr('href', '/web/image/website/'+result[0].id+'/favicon'); + }); + }, + }); + +var ExceptionHandler = { + /** + * @param parent The parent. + * @param error The error object as returned by the JSON-RPC implementation. + */ + init: function(parent, error) {}, + /** + * Called to inform to display the widget, if necessary. A typical way would be to implement + * this interface in a class extending instance.web.Dialog and simply display the dialog in this + * method. + */ + display: function() {}, +}; + +var RedirectWarningHandler = Dialog.extend(ExceptionHandler, { + init: function(parent, error) { + this._super(parent); + this.error = error; + }, + display: function() { + var self = this; + var error = this.error; + error.data.message = error.data.arguments[0]; + + new Dialog(this, { + size: 'medium', + title: _.str.capitalize(error.type) || _t("Warning"), + buttons: [ + {text: error.data.arguments[2], classes : "btn-primary", click: function() { + window.location.href = '#action='+error.data.arguments[1]; + self.destroy(); + }}, + {text: _t("Cancel"), click: function() { self.destroy(); }, close: true} + ], + $content: QWeb.render('CrashManager.warning', {error: error}), + }).open(); + } +}); +core.crash_registry.add('odoo.exceptions.RedirectWarning', RedirectWarningHandler); + +function session_expired(cm) { + return { + display: function () { + cm.show_warning({type: _t("Session Expired"), data: {message: _t("Your Odoo session expired. Please refresh the current web page.")}}); + } + }; +} +core.crash_registry.add('odoo.http.SessionExpiredException', session_expired); + + +}); diff --git a/odoo-debrand/static/src/xml/base.xml b/odoo-debrand/static/src/xml/base.xml new file mode 100644 index 000000000..f40c74b50 --- /dev/null +++ b/odoo-debrand/static/src/xml/base.xml @@ -0,0 +1,28 @@ + + + + + + + + + + Your permission is required to enable desktop notifications. + + + + +
+ +
+
+
+
\ No newline at end of file diff --git a/odoo-debrand/views/database_manager_extend.html b/odoo-debrand/views/database_manager_extend.html new file mode 100644 index 000000000..ccbc5c992 --- /dev/null +++ b/odoo-debrand/views/database_manager_extend.html @@ -0,0 +1,366 @@ + + + + {{ website_name }} + + + + + + + + + + + + + + + + + + + + + + + + + + {% macro master_input() -%} +
+ {% if insecure %} + + {% else %} + + + {% endif %} +
+ {%- endmacro %} + + {% macro create_form() -%} + {{ master_input() }} +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ {%- endmacro %} + + +
+ +
+
+ + + {% if not list_db %} +
The database manager has been disabled by the administrator
+ {% elif insecure and databases %} +
+ Warning, {{ company_name }} database manager is not protected.
+ Please set a master password to secure it. +
+ {% endif %} + {% if error %} +
{{ error }}
+ {% endif %} + {% if list_db and databases %} +
+ {% for db in databases %} +
+ + {% if db in incompatible_databases %} + + {% endif %} + {{ db }} + + {% if manage %} +
+ + + +
+ {% endif %} +
+ {% endfor %} +
+ {% if manage %} +
+ + + +
+ {% else %} + + {% endif %} + {% elif list_db %} +
+ {{ create_form() }} + +
+ or restore a database + {% endif %} +
+
+
+ + + + + + + + + + + + + + + + + + + + diff --git a/odoo-debrand/views/views.xml b/odoo-debrand/views/views.xml new file mode 100644 index 000000000..27e03123c --- /dev/null +++ b/odoo-debrand/views/views.xml @@ -0,0 +1,29 @@ + + +