Browse Source

[ADD] Initial Commit

pull/195/head
Ajmal Cybro 4 years ago
parent
commit
6049f82e36
  1. 48
      insurance_management_cybro/README.rst
  2. 23
      insurance_management_cybro/__init__.py
  3. 47
      insurance_management_cybro/__manifest__.py
  4. 20
      insurance_management_cybro/data/insurance_management_data.xml
  5. 7
      insurance_management_cybro/doc/RELEASE_NOTES.md
  6. 27
      insurance_management_cybro/models/__init__.py
  7. 30
      insurance_management_cybro/models/account_move.py
  8. 76
      insurance_management_cybro/models/claim_details.py
  9. 97
      insurance_management_cybro/models/employee_details.py
  10. 93
      insurance_management_cybro/models/insurance_details.py
  11. 46
      insurance_management_cybro/models/policy_details.py
  12. 7
      insurance_management_cybro/security/ir.model.access.csv
  13. BIN
      insurance_management_cybro/static/description/assets/icons/check.png
  14. BIN
      insurance_management_cybro/static/description/assets/icons/chevron.png
  15. BIN
      insurance_management_cybro/static/description/assets/icons/cogs.png
  16. BIN
      insurance_management_cybro/static/description/assets/icons/consultation.png
  17. BIN
      insurance_management_cybro/static/description/assets/icons/ecom-black.png
  18. BIN
      insurance_management_cybro/static/description/assets/icons/education-black.png
  19. BIN
      insurance_management_cybro/static/description/assets/icons/hotel-black.png
  20. BIN
      insurance_management_cybro/static/description/assets/icons/license.png
  21. BIN
      insurance_management_cybro/static/description/assets/icons/lifebuoy.png
  22. BIN
      insurance_management_cybro/static/description/assets/icons/logo.png
  23. BIN
      insurance_management_cybro/static/description/assets/icons/manufacturing-black.png
  24. BIN
      insurance_management_cybro/static/description/assets/icons/pos-black.png
  25. BIN
      insurance_management_cybro/static/description/assets/icons/puzzle.png
  26. BIN
      insurance_management_cybro/static/description/assets/icons/restaurant-black.png
  27. BIN
      insurance_management_cybro/static/description/assets/icons/service-black.png
  28. BIN
      insurance_management_cybro/static/description/assets/icons/trading-black.png
  29. BIN
      insurance_management_cybro/static/description/assets/icons/training.png
  30. BIN
      insurance_management_cybro/static/description/assets/icons/update.png
  31. BIN
      insurance_management_cybro/static/description/assets/icons/user.png
  32. BIN
      insurance_management_cybro/static/description/assets/icons/wrench.png
  33. BIN
      insurance_management_cybro/static/description/assets/modules/approval_image.png
  34. BIN
      insurance_management_cybro/static/description/assets/modules/budget_image.png
  35. BIN
      insurance_management_cybro/static/description/assets/modules/export_image.png
  36. BIN
      insurance_management_cybro/static/description/assets/modules/magento_image.png
  37. BIN
      insurance_management_cybro/static/description/assets/modules/pos_image.png
  38. BIN
      insurance_management_cybro/static/description/assets/modules/shopify_image.png
  39. BIN
      insurance_management_cybro/static/description/assets/screenshots/hero.png
  40. BIN
      insurance_management_cybro/static/description/assets/screenshots/insurance_management_cybro-1.png
  41. BIN
      insurance_management_cybro/static/description/assets/screenshots/insurance_management_cybro-2.png
  42. BIN
      insurance_management_cybro/static/description/assets/screenshots/insurance_management_cybro-3.png
  43. BIN
      insurance_management_cybro/static/description/assets/screenshots/insurance_management_cybro-4.png
  44. BIN
      insurance_management_cybro/static/description/assets/screenshots/insurance_management_cybro-5.png
  45. BIN
      insurance_management_cybro/static/description/banner.png
  46. BIN
      insurance_management_cybro/static/description/icon.png
  47. 552
      insurance_management_cybro/static/description/index.html
  48. 69
      insurance_management_cybro/views/claim_details_views.xml
  49. 71
      insurance_management_cybro/views/employee_details_views.xml
  50. 79
      insurance_management_cybro/views/insurance_details_views.xml
  51. 22
      insurance_management_cybro/views/insurance_management_menus.xml
  52. 62
      insurance_management_cybro/views/policy_details_views.xml
  53. 40
      sale_purchase_automated/README.rst
  54. 23
      sale_purchase_automated/__init__.py
  55. 43
      sale_purchase_automated/__manifest__.py
  56. 10
      sale_purchase_automated/doc/RELEASE_NOTES.md
  57. 25
      sale_purchase_automated/models/__init__.py
  58. 51
      sale_purchase_automated/models/purchase.py
  59. 82
      sale_purchase_automated/models/res_config_settings.py
  60. 61
      sale_purchase_automated/models/sale_order.py
  61. BIN
      sale_purchase_automated/static/description/assets/icons/check.png
  62. BIN
      sale_purchase_automated/static/description/assets/icons/chevron.png
  63. BIN
      sale_purchase_automated/static/description/assets/icons/cogs.png
  64. BIN
      sale_purchase_automated/static/description/assets/icons/consultation.png
  65. BIN
      sale_purchase_automated/static/description/assets/icons/ecom-black.png
  66. BIN
      sale_purchase_automated/static/description/assets/icons/education-black.png
  67. BIN
      sale_purchase_automated/static/description/assets/icons/hotel-black.png
  68. BIN
      sale_purchase_automated/static/description/assets/icons/license.png
  69. BIN
      sale_purchase_automated/static/description/assets/icons/lifebuoy.png
  70. BIN
      sale_purchase_automated/static/description/assets/icons/logo.png
  71. BIN
      sale_purchase_automated/static/description/assets/icons/manufacturing-black.png
  72. BIN
      sale_purchase_automated/static/description/assets/icons/pos-black.png
  73. BIN
      sale_purchase_automated/static/description/assets/icons/puzzle.png
  74. BIN
      sale_purchase_automated/static/description/assets/icons/restaurant-black.png
  75. BIN
      sale_purchase_automated/static/description/assets/icons/service-black.png
  76. BIN
      sale_purchase_automated/static/description/assets/icons/trading-black.png
  77. BIN
      sale_purchase_automated/static/description/assets/icons/training.png
  78. BIN
      sale_purchase_automated/static/description/assets/icons/update.png
  79. BIN
      sale_purchase_automated/static/description/assets/icons/user.png
  80. BIN
      sale_purchase_automated/static/description/assets/icons/wrench.png
  81. BIN
      sale_purchase_automated/static/description/assets/modules/approval_image.png
  82. BIN
      sale_purchase_automated/static/description/assets/modules/budget_image.png
  83. BIN
      sale_purchase_automated/static/description/assets/modules/export_image.png
  84. BIN
      sale_purchase_automated/static/description/assets/modules/magento_image.png
  85. BIN
      sale_purchase_automated/static/description/assets/modules/pos_image.png
  86. BIN
      sale_purchase_automated/static/description/assets/modules/shopify_image.png
  87. BIN
      sale_purchase_automated/static/description/assets/screenshots/hero.png
  88. BIN
      sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-1.png
  89. BIN
      sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-10.png
  90. BIN
      sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-11.png
  91. BIN
      sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-12.png
  92. BIN
      sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-13.png
  93. BIN
      sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-14.png
  94. BIN
      sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-2.png
  95. BIN
      sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-3.png
  96. BIN
      sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-4.png
  97. BIN
      sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-5.png
  98. BIN
      sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-6.png
  99. BIN
      sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-7.png
  100. BIN
      sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-8.png

48
insurance_management_cybro/README.rst

@ -0,0 +1,48 @@
.. 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 <https://cybrosys.com/>`__
Credits
-------
* Developer: Niyas Raphy@cybrosys
Sreejith P @cybrosys
version 13: Nimisha Murali @cybrosys
version 14: Muhammed Nafih @cybrosys
version 15: Abhishek E T @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 <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

23
insurance_management_cybro/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models

47
insurance_management_cybro/__manifest__.py

@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': 'Insurance Management',
'version': '15.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': ['account', 'base'],
'license': 'AGPL-3',
'data': [
'security/ir.model.access.csv',
'data/insurance_management_data.xml',
'views/claim_details_views.xml',
'views/employee_details_views.xml',
'views/insurance_details_views.xml',
'views/policy_details_views.xml',
'views/insurance_management_menus.xml'
],
'images': ['static/description/banner.png'],
'installable': True,
'application': True,
'auto_install': False,
}

20
insurance_management_cybro/data/insurance_management_data.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="insurance_details_sequence" model="ir.sequence">
<field name="name">Insurance Details</field>
<field name="code">insurance.details</field>
<field name="prefix">INS/</field>
<field name="padding">3</field>
<field name="company_id" eval="False"/>
</record>
<record id="claim_details_sequence" model="ir.sequence">
<field name="name">Claim Details</field>
<field name="code">claim.details</field>
<field name="prefix">CLM/</field>
<field name="padding">3</field>
<field name="company_id" eval="False"/>
</record>
</odoo>

7
insurance_management_cybro/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <insurance_management_cybro>
#### 11.11.2021
#### Version 15.0.1.0.0
#### ADD
- Initial commit for Insurance Management

27
insurance_management_cybro/models/__init__.py

@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import account_move
from . import claim_details
from . import employee_details
from . import insurance_details
from . import policy_details

30
insurance_management_cybro/models/account_move.py

@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields
class AccountMove(models.Model):
_inherit = 'account.move'
insurance_id = fields.Many2one('insurance.details', string='Insurance')
claim_id = fields.Many2one('claim.details', string='Insurance')

76
insurance_management_cybro/models/claim_details.py

@ -0,0 +1,76 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models, _
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,
domain=[('state', '=', 'confirmed')],
help="Confirmed orders can be selected")
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)
currency_id = fields.Many2one(
'res.currency', string='Currency', required=True,
default=lambda self: self.env.user.company_id.currency_id.id)
amount = fields.Monetary(related='insurance_id.amount', string='Amount')
date_claimed = fields.Date(
string='Date Applied', default=fields.Date.context_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 action_create_bill(self):
if not self.invoice_id:
invoice_val = self.env['account.move'].sudo().create({
'move_type': 'in_invoice',
'invoice_date': fields.Date.context_today(self),
'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

97
insurance_management_cybro/models/employee_details.py

@ -0,0 +1,97 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
import re
from odoo import api, fields, models, _
from odoo.exceptions import UserError, ValidationError
class EmployeeDetails(models.Model):
_name = 'employee.details'
name = fields.Char(string='Name', required=True)
user_id = fields.Many2one(
'res.users', string='Related User', copy=False)
sex = fields.Selection(
[('male', 'Male'), ('female', 'Female'), ('others', 'Others')])
phone = fields.Char(string='Phone Number')
salary_type = fields.Selection(
[('fixed', 'Fixed'), ('commission', 'Commission'), ('both', 'Both')],
default='commission', required=True)
currency_id = fields.Many2one(
'res.currency', string='Currency', required=True,
default=lambda self: self.env.user.company_id.currency_id.id)
base_salary = fields.Monetary(string='Base Salary')
last_salary_date = 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 action_salary_payment(self):
if self.invoice_id:
if self.invoice_id.state == 'draft':
raise UserError(_("You must validate the last payment made in "
"order to create a new payment"))
amount = 0.0
if self.base_salary == 0.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_date:
if ins.start_date > self.last_salary_date:
amount += (ins.commission_rate * ins.amount) / 100
else:
amount = self.base_salary
for ins in self.insurance_ids:
if ins.start_date > self.last_salary_date:
amount += (ins.commission_rate * ins.amount) / 100
invoice_date = self.env['account.move'].sudo().create({
'move_type': 'in_invoice',
'invoice_date': fields.Date.context_today(self),
'partner_id': self.user_id.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.sudo().write({
'invoice_id': invoice_date.id,
'last_salary_date': fields.Date.context_today(self),
})
@api.constrains('phone')
def check_phone(self):
""" make sure phone contains only numbers"""
for rec in self:
if not re.match('^[0-9]*$', rec.phone):
raise ValidationError(
_('Only numbers are permitted in phone number'))

93
insurance_management_cybro/models/insurance_details.py

@ -0,0 +1,93 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models, _
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)
start_date = fields.Date(
string='Date Started', default=fields.Date.context_today, required=True)
close_date = fields.Date(string='Date Closed', readonly=True)
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)
currency_id = fields.Many2one(
'res.currency', string='Currency', required=True,
default=lambda self: self.env.user.company_id.currency_id.id)
amount = fields.Monetary(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 action_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 action_create_invoice(self):
created_invoice = self.env['account.move'].sudo().create({
'move_type': 'out_invoice',
'invoice_date': fields.Date.context_today(self),
'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 action_close_insurance(self):
for records in self.invoice_ids:
if records.state == 'paid':
raise UserError(_("All invoices must be paid"))
self.state = 'closed'
self.close_date = fields.Date.context_today(self)
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)

46
insurance_management_cybro/models/policy_details.py

@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
class PolicyDetails(models.Model):
_name = 'policy.details'
name = fields.Char(string='Name', required=True)
policy_type_id = fields.Many2one(
'policy.type', string='Policy Type', required=True)
payment_type = fields.Selection(
[('fixed', 'Fixed'), ('installment', 'Installment')],
required=True, default='fixed')
currency_id = fields.Many2one(
'res.currency', string='Currency', required=True,
default=lambda self: self.env.user.company_id.currency_id.id)
amount = fields.Monetary(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')

7
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,claim.details,model_claim_details,base.group_user,1,1,1,1
access_employee_details,employee.details,model_employee_details,base.group_user,1,1,1,1
access_insurance_details,insurance.details,model_insurance_details,base.group_user,1,1,1,1
access_policy_details,policy.details,model_policy_details,base.group_user,1,1,1,1
access_policy_type,policy.type,model_policy_type,base.group_user,1,1,1,1
access_account_move,account.move,model_account_move,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_claim_details claim.details model_claim_details base.group_user 1 1 1 1
3 access_employee_details employee.details model_employee_details base.group_user 1 1 1 1
4 access_insurance_details insurance.details model_insurance_details base.group_user 1 1 1 1
5 access_policy_details policy.details model_policy_details base.group_user 1 1 1 1
6 access_policy_type policy.type model_policy_type base.group_user 1 1 1 1
7 access_account_move account.move model_account_move base.group_user 1 1 1 1

BIN
insurance_management_cybro/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
insurance_management_cybro/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
insurance_management_cybro/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
insurance_management_cybro/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
insurance_management_cybro/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
insurance_management_cybro/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
insurance_management_cybro/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
insurance_management_cybro/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
insurance_management_cybro/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
insurance_management_cybro/static/description/assets/icons/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
insurance_management_cybro/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
insurance_management_cybro/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
insurance_management_cybro/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
insurance_management_cybro/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
insurance_management_cybro/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
insurance_management_cybro/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
insurance_management_cybro/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
insurance_management_cybro/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
insurance_management_cybro/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
insurance_management_cybro/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
insurance_management_cybro/static/description/assets/modules/approval_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
insurance_management_cybro/static/description/assets/modules/budget_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
insurance_management_cybro/static/description/assets/modules/export_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
insurance_management_cybro/static/description/assets/modules/magento_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
insurance_management_cybro/static/description/assets/modules/pos_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
insurance_management_cybro/static/description/assets/modules/shopify_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
insurance_management_cybro/static/description/assets/screenshots/hero.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

BIN
insurance_management_cybro/static/description/assets/screenshots/insurance_management_cybro-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 KiB

BIN
insurance_management_cybro/static/description/assets/screenshots/insurance_management_cybro-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
insurance_management_cybro/static/description/assets/screenshots/insurance_management_cybro-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
insurance_management_cybro/static/description/assets/screenshots/insurance_management_cybro-4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
insurance_management_cybro/static/description/assets/screenshots/insurance_management_cybro-5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
insurance_management_cybro/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
insurance_management_cybro/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

552
insurance_management_cybro/static/description/index.html

@ -0,0 +1,552 @@
<div class="container" style="padding: 1rem !important; margin-bottom: 1rem !important;">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between" style="border-bottom: 1px solid #d5d5d5;">
<div class="my-3">
<img src="./assets/icons/logo.png" style="width: auto !important; height: 40px !important;">
</div>
<div class="my-3 d-flex align-items-center">
<div style="background-color: #7C7BAD !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Community
</div>
<!-- <div style="background-color: #875A7B !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">-->
<!-- <i class="fa fa-check mr-1"></i>Enterprise-->
<!-- </div>-->
</div>
</div>
</div>
</div>
<div class="container" style="padding: 0rem 1.5rem 4rem !important">
<div class="row" style="height: 900px !important;">
<div class="col-sm-12 col-md-12 col-lg-12" style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;">
<h1 style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important; font-size: 3.5rem !important; text-align: center !important;">
Insurance Management
</h1>
<p style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;">
A Module for Manage Insurance Business.
</p>
<img src="./assets/screenshots/hero.png" class="img-responsive" width="100%" height="auto" />
</div>
</div>
<div class="row">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important">
<h2 style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-compass mr-2"></i>Explore this module
</h2>
</div>
<div class="col-md-6">
<a href="#overview" style="text-decoration: none !important;">
<div class="row" style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3 style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">Overview</h3>
<p style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
Learn more about this module
</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#configuration" style="text-decoration: none !important;">
<div class="row" style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3 style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Configuration</h3>
<p style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
View configurations for this module
</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#features" style="text-decoration: none !important;">
<div class="row" style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3 style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">Features</h3>
<p style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
View features of this module
</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#screenshots" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3 style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">Screenshots</h3>
<p style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
See key screenshots of this module
</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
</div>
<div class="row" id="overview">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2 style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-pie-chart mr-2"></i>Overview
</h2>
</div>
<div class="col-mg-12 pl-3">
<p style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
This module crafted by Cybrosys Technologies, allows the user to create insurance policies.
Insurances can be created under these policies. We can manage the insurance claims and the
salary of agents with or without the commission.
</p>
</div>
</div>
<div class="row" id="configuration">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2 style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-cogs mr-2"></i>Configuration
</h2>
</div>
<div class="col-mg-12 pl-3">
<p style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">The accounting localization for the country has to be installed</p>
</div>
</div>
<div class="row" id="features">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2 style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-star mr-2"></i>Features
</h2>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">Create insurance policies for customers</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">Manage insurance claims and details</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">Manage salary and commission of agents</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4 style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">Create accounting entries for all</h4>
<p style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">Invoices/ Bills can be created for insurance, claims and the salary/commission of agents.</p>
</div>
</div>
</div>
<div class="row" id="screenshots">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2 style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-image mr-2"></i>Screenshots
</h2>
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2" style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">View and manage customers</h4>
<p>Configuration -> Customers</p>
<img src="assets/screenshots/insurance_management_cybro-1.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2" style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">Manage policies</h4>
<p>Configuration -> Policies</p>
<p>Create new policies and add the policy details</p>
<img src="assets/screenshots/insurance_management_cybro-2.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2" style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">Manage Agents(Employee)</h4>
<p>Agent -> Agent</p>
<p>Create new agent and add the details. The salary type can be selected as fixed, commission or both(salary + commission).
The salary payment can be done where the salary is computed based on the salary type selected. The commission is
calculated based on the percentage mentioned in the insurances under the agent.</p>
<img src="assets/screenshots/insurance_management_cybro-3.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2" style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">Manage insurances</h4>
<p>Insurance Management -> Insurance</p>
<p>Create insurance to customers based on a policy. Add the agent and the commission of agent in percentage.
The insurance can be confirmed after adding all required details. Invoice can be created for the insurance.</p>
<img src="assets/screenshots/insurance_management_cybro-4.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2" style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">Manage claims</h4>
<p>Insurance Management -> Claims</p>
<P>Insurance claims can be created for the confirmed insurances. Bill can be created for the claim.</P>
<img src="assets/screenshots/insurance_management_cybro-5.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
</div>
<!-- SUGGESTED PRODUCTS -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="color: #212529 !important;">Suggested Products</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/export_stockinfo_xls/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/export_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/dashboard_pos/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/pos_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/product_approval_management/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/approval_image.png">
</div>
</a>
</div>
</div>
<div class="carousel-item" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/base_account_budget/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/budget_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/shopify_odoo_connector/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/shopify_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/odoo11_magento2/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/magento_image.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="left:-25px;width: 35px;color: #000;"> <span class="carousel-control-prev-icon"><i
class="fa fa-chevron-left" style="font-size:24px"></i></span> </a> <a
class="carousel-control-next" href="#demo1" data-slide="next"
style="right:-25px;width: 35px;color: #000;">
<span class="carousel-control-next-icon"><i class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a>
</div>
</div>
</div>
<!-- END OF SUGGESTED PRODUCTS -->
<!-- OUR SERVICES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Services</h2>
<hr style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo Customization
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo Implementation
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo Support
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire Odoo Developer
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo Integration
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo Migration
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo Implementation
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo Licensing Consultancy
</h6>
</div>
</div>
</section>
<!-- END OF END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Industries</h2>
<hr style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/trading-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure and sell your products
</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/pos-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy configuration and convivial experience
</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/education-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for educational management
</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/manufacturing-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and schedule your operations
</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/ecom-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Mobile friendly, awe-inspiring product pages
</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/service-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Keep track of services and invoice
</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/restaurant-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Run your bar or restaurant methodically
</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/hotel-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
An all-inclusive hotel management application
</p>
</div>
</div>
</div>
</section>
<!-- END OF END OF OUR INDUSTRIES -->
<!-- FOOTER -->
<!-- Footer Section -->
<section class="container" style="margin: 5rem auto 2rem;">
<div class="row" style="max-width:1540px;">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Need Help?</h2>
<hr style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
</div>
<!-- Contact Cards -->
<div class="row d-flex justify-content-center align-items-center" style="max-width:1540px; margin: 0 auto 2rem auto;">
<div class="col-lg-12" style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; ">
<div class="row mt-4">
<div class="col-lg-6">
<a href="mailto:odoo@cybrosys.com" target="_blank" class="btn btn-block mb-2 deep_hover" style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;">
<i class="fa fa-envelope mr-2"></i>odoo@cybrosys.com
</a>
</div>
<div class="col-lg-6">
<a href="https://api.whatsapp.com/send?phone=918606827707" target="_blank" class="btn btn-block mb-2 deep_hover" style="text-decoration: none; background-color: #25D366; color: #FFF; border-radius: 4px;">
<i class="fa fa-whatsapp mr-2"></i>WhatsApp
</a>
</div>
</div>
</div>
</div>
<!-- End of Contact Cards -->
</section>
<!-- Footer -->
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<div class="row" style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<!-- Logo -->
<div class="col-lg-12 d-flex justify-content-center align-items-center" style="margin-top: 3rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px" height="auto" />
</div>
<!-- End of Logo -->
<div class="col-lg-12">
<hr style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
<!-- End of Footer Section -->
</div>
</div>
</section>
<!-- END OF FOOTER -->
</div>

69
insurance_management_cybro/views/claim_details_views.xml

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="claim_details_view_form" model="ir.ui.view">
<field name="name">claim.details.view.form</field>
<field name="model">claim.details</field>
<field name="arch" type="xml">
<form string="Claim Details Form">
<header>
<button name="action_create_bill" string="Create Bill" type="object" class="oe_highlight"
attrs="{'invisible': [('invoice_id', '!=', False)]}"/>
</header>
<sheet>
<div class="oe_title">
<h1>
<field name="name"/>
</h1>
</div>
<group>
<group>
<field name="insurance_id" options="{'no_create': True}"/>
<field name="partner_id"/>
<field name="policy_id"/>
<field name="employee_id"/>
</group>
<group>
<field name="date_claimed"/>
<field name="currency_id" invisible="1"/>
<field name="amount"/>
<field name="invoice_id"/>
</group>
</group>
<notebook>
<page string="Extra Notes">
<field name="note_field"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="claim_details_view_tree" model="ir.ui.view">
<field name="name">claim.details.view.tree</field>
<field name="model">claim.details</field>
<field name="arch" type="xml">
<tree string="Claim Details Tree">
<field name="name"/>
<field name="insurance_id"/>
<field name="partner_id"/>
<field name="policy_id"/>
<field name="currency_id" invisible="1"/>
<field name="amount"/>
</tree>
</field>
</record>
<record id="claim_details_action" model="ir.actions.act_window">
<field name="name">Claim Management</field>
<field name="res_model">claim.details</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
You haven't created any claims yet.
</p>
</field>
</record>
</odoo>

71
insurance_management_cybro/views/employee_details_views.xml

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="employee_details_view_form" model="ir.ui.view">
<field name="name">employee.details.view.form</field>
<field name="model">employee.details</field>
<field name="arch" type="xml">
<form string="Employee Details Form">
<header>
<button name="action_salary_payment" string="Salary Payment" type="object"
attrs="{'invisible': [('user_id', '=', False)]}" class="oe_highlight"/>
</header>
<sheet>
<div class="oe_title">
<h1>
<field name="name"/>
</h1>
</div>
<group>
<group>
<field name="phone"/>
<field name="salary_type"/>
<field name="currency_id" invisible="1"/>
<field name="base_salary"/>
</group>
<group>
<field name="sex"/>
<field name="last_salary_date"/>
<field name="user_id"/>
<field name="invoice_id"/>
</group>
</group>
<notebook>
<page string="Insurance_ids">
<field name="insurance_ids"/>
</page>
<page string="Extra Notes">
<field name="note_field"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="employee_details_view_tree" model="ir.ui.view">
<field name="name">employee.details.view.tree</field>
<field name="model">employee.details</field>
<field name="arch" type="xml">
<tree string="Employee Details Tree">
<field name="name"/>
<field name="phone"/>
<field name="salary_type"/>
<field name="sex"/>
<field name="last_salary_date"/>
</tree>
</field>
</record>
<record id="employee_details_action" model="ir.actions.act_window">
<field name="name">Employee Management</field>
<field name="res_model">employee.details</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
You haven't created any employee yet.
</p>
</field>
</record>
</odoo>

79
insurance_management_cybro/views/insurance_details_views.xml

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="insurance_details_view_form" model="ir.ui.view">
<field name="name">insurance.details.view.form</field>
<field name="model">insurance.details</field>
<field name="arch" type="xml">
<form string="Insurance Details Form">
<header>
<button name="action_confirm_insurance" string="Confirm" type="object"
states="draft" class="oe_highlight"/>
<button name="action_create_invoice" string="Create Invoice" type="object" class="oe_highlight"
attrs="{'invisible': [('hide_inv_button', '!=', True)]}"/>
<button name="action_close_insurance" string="Close" type="object"
states="confirmed" class="oe_highlight"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<div class="oe_title">
<h1>
<field name="name"/>
</h1>
</div>
<group>
<group>
<field name="partner_id"/>
<field name="policy_id"/>
<field name="employee_id"/>
<field name="commission_rate"/>
<field name="hide_inv_button" invisible="1"/>
</group>
<group>
<field name="start_date"/>
<field name="close_date"/>
<field name="currency_id" invisible="1"/>
<field name="amount"/>
</group>
</group>
<notebook>
<page string="Invoices">
<field name="invoice_ids"/>
</page>
<page string="Extra Notes">
<field name="note_field"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="insurance_details_view_tree" model="ir.ui.view">
<field name="name">insurance.details.view.tree</field>
<field name="model">insurance.details</field>
<field name="arch" type="xml">
<tree string="Insurance Details Tree">
<field name="name"/>
<field name="partner_id"/>
<field name="policy_id"/>
<field name="employee_id"/>
<field name="currency_id" invisible="1"/>
<field name="amount"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="insurance_details_action" model="ir.actions.act_window">
<field name="name">Insurance Management</field>
<field name="res_model">insurance.details</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
You haven't created any insurance yet.
</p>
</field>
</record>
</odoo>

22
insurance_management_cybro/views/insurance_management_menus.xml

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<menuitem id="insurance_management_menu_root" name="Insurance" sequence="5"
web_icon="insurance_management_cybro,static/description/icon.png"/>
<menuitem id="insurance_management_menu_insurance_management" name="Insurance Management"
parent="insurance_management_menu_root" sequence="10"/>
<menuitem id="insurance_details_menu_action" name="Insurance" parent="insurance_management_menu_insurance_management"
action="insurance_details_action" sequence="10"/>
<menuitem id="claim_details_menu_action" name="Claims" parent="insurance_management_menu_insurance_management"
action="claim_details_action" sequence="20"/>
<menuitem id="insurance_management_menu_agent" name="Agent" parent="insurance_management_menu_root" sequence="20"/>
<menuitem id="employee_details_menu_action" name="Agent" parent="insurance_management_menu_agent"
action="employee_details_action" sequence="10"/>
<menuitem id="insurance_management_menu_configuration" name="Configuration" parent="insurance_management_menu_root"
sequence="30"/>
<menuitem id="policy_details_menu_action" name="Policy" parent="insurance_management_menu_configuration"
action="policy_details_action" sequence="10"/>
<menuitem id="res_partner_customer_menu_action" name="Customers" parent="insurance_management_menu_configuration"
action="base.action_partner_customer_form" sequence="20"/>
</odoo>

62
insurance_management_cybro/views/policy_details_views.xml

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="policy_details_view_form" model="ir.ui.view">
<field name="name">policy.details.view.form</field>
<field name="model">policy.details</field>
<field name="arch" type="xml">
<form string="Policy Details Form">
<sheet>
<div class="oe_title">
<h1>
<field name="name"/>
</h1>
</div>
<group>
<group>
<field name="policy_type_id"/>
<field name="policy_duration"/>
</group>
<group>
<field name="payment_type"/>
<field name="currency_id" invisible="1"/>
<field name="amount"/>
</group>
</group>
<notebook>
<page string="Extra Notes">
<field name="note_field"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="policy_details_view_tree" model="ir.ui.view">
<field name="name">policy.details.view.tree</field>
<field name="model">policy.details</field>
<field name="arch" type="xml">
<tree string="Policy Details Tree">
<field name="name"/>
<field name="policy_type_id"/>
<field name="policy_duration"/>
<field name="payment_type"/>
<field name="currency_id" invisible="1"/>
<field name="amount"/>
</tree>
</field>
</record>
<record id="policy_details_action" model="ir.actions.act_window">
<field name="name">Policy Management</field>
<field name="res_model">policy.details</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
You haven't created any policy yet.
</p>
</field>
</record>
</odoo>

40
sale_purchase_automated/README.rst

@ -0,0 +1,40 @@
Automate Sale And Purchase Orders
=================================
This module provides an option to automate the sale and purchase order.
Configuration
=============
* The invoice policy should be set as 'Ordered Quantities' to automate invoice creation and printing.
* The accounting localization for the country has to be installed.
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
Credits
-------
* Developers: Nimisha Murali @cybrosys, Contact: odoo@cybrosys.com
version 14: Minhaj T @cybrosys, Contact: odoo@cybrosys.com
version 15: Abhishek E T @cybrosys, 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 `Our Website <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

23
sale_purchase_automated/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Nimisha Muralidhar (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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models

43
sale_purchase_automated/__manifest__.py

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Nimisha Muralidhar (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 <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': 'Automate Sale And Purchase Orders',
'version': '15.0.1.0.0',
'category': 'Extra Tools',
'summary': 'Automate the sale and purchase orders flow',
'description': 'Automate sale and purchase orders flow',
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'images': ['static/description/banner.png'],
'website': 'https://www.cybrosys.com',
'depends': ['account', 'base', 'purchase', 'sale_management'],
'data': [
'views/purchase_views.xml',
'views/res_config_settings_views.xml',
'views/sale_order_views.xml'
],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

10
sale_purchase_automated/doc/RELEASE_NOTES.md

@ -0,0 +1,10 @@
## Module <sale_purchase_automated>
#### 11.11.2021
#### Version 15.0.1.0.0
#### ADD
Initial commit for Automate Sale And Purchase Orders

25
sale_purchase_automated/models/__init__.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Nimisha Muralidhar (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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import purchase
from . import res_config_settings
from . import sale_order

51
sale_purchase_automated/models/purchase.py

@ -0,0 +1,51 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Nimisha Muralidhar (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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models
class PurchaseOrder(models.Model):
_inherit = 'purchase.order'
automate_print_bills = fields.Boolean(
'Create Bills', help="Create bills with purchase orders")
@api.model
def create(self, vals):
"""Super the method create to confirm RFQ"""
res = super(PurchaseOrder, self).create(vals)
automate_purchase = self.env['ir.config_parameter'].sudo().get_param(
'automate_purchase')
automate_print_bills = self.env['ir.config_parameter'].sudo().get_param(
'automate_print_bills')
if automate_purchase:
res.button_confirm()
if automate_print_bills:
res.automate_print_bills = True
return res
else:
return res
def action_print_bill(self):
"""Method to print bill"""
data = self.invoice_ids
return self.env.ref('account.account_invoices').report_action(data)

82
sale_purchase_automated/models/res_config_settings.py

@ -0,0 +1,82 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Nimisha Muralidhar (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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
automate_purchase = fields.Boolean(
'Confirm RFQ', default=False, help="Automate confirmation for RFQ")
automate_print_bills = fields.Boolean(
'Print Bills', default=False,
help="Print bill from corresponding purchase order")
automate_sale = fields.Boolean(
'Confirm Quotation', default=False,
help="Automate confirmation for quotation")
automate_invoice = fields.Boolean(
'Create Invoice', default=False, help="Create invoices for sales order")
automate_validate_invoice = fields.Boolean(
'Validate Invoice', default=False,
help="Automate validation of invoice")
automate_print_invoices = fields.Boolean(
'Print Invoices', default=False,
help="Print invoice from corresponding sales order")
@api.model
def get_values(self):
"""Get values from the fields"""
res = super(ResConfigSettings, self).get_values()
res.update(
automate_purchase=self.env['ir.config_parameter'].sudo().get_param(
'automate_purchase'),
automate_print_bills=self.env[
'ir.config_parameter'].sudo().get_param('automate_print_bills'),
automate_print_invoices=self.env[
'ir.config_parameter'].sudo().get_param(
'automate_print_invoices'),
automate_sale=self.env['ir.config_parameter'].sudo().get_param(
'automate_sale'),
automate_invoice=self.env['ir.config_parameter'].sudo().get_param(
'automate_invoice'),
automate_validate_invoice=self.env[
'ir.config_parameter'].sudo().get_param(
'automate_validate_invoice'),
)
return res
def set_values(self):
"""Set values in the fields"""
super(ResConfigSettings, self).set_values()
self.env['ir.config_parameter'].sudo().set_param(
'automate_purchase', self.automate_purchase)
self.env['ir.config_parameter'].sudo().set_param(
'automate_print_bills', self.automate_print_bills)
self.env['ir.config_parameter'].sudo().set_param(
'automate_print_invoices', self.automate_print_invoices)
self.env['ir.config_parameter'].sudo().set_param(
'automate_sale', self.automate_sale)
self.env['ir.config_parameter'].sudo().set_param(
'automate_invoice', self.automate_invoice)
self.env['ir.config_parameter'].sudo().set_param(
'automate_validate_invoice', self.automate_validate_invoice)

61
sale_purchase_automated/models/sale_order.py

@ -0,0 +1,61 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Nimisha Muralidhar (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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models
class SaleOrder(models.Model):
_inherit = 'sale.order'
automate_print_invoices = fields.Boolean(
'Print Invoices',
help="Print invoices for corresponding purchase orders")
@api.model_create_multi
def create(self, vals_list):
"""
Super the method create to confirm quotation, create and validate
invoice
"""
res = super(SaleOrder, self).create(vals_list)
automate_purchase = self.env['ir.config_parameter'].sudo().get_param(
'automate_sale')
automate_invoice = self.env['ir.config_parameter'].sudo().get_param(
'automate_invoice')
automate_print_invoices = self.env[
'ir.config_parameter'].sudo().get_param('automate_print_invoices')
automate_validate_invoice = self.env[
'ir.config_parameter'].sudo().get_param('automate_validate_invoice')
if automate_print_invoices:
res.automate_print_invoices = True
if automate_purchase:
res.action_confirm()
if automate_invoice:
res._create_invoices()
if automate_validate_invoice:
res.invoice_ids.action_post()
return res
def action_print_invoice(self):
"""Method to print invoice"""
data = self.invoice_ids
return self.env.ref('account.account_invoices').report_action(data)

BIN
sale_purchase_automated/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
sale_purchase_automated/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
sale_purchase_automated/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
sale_purchase_automated/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
sale_purchase_automated/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
sale_purchase_automated/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
sale_purchase_automated/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
sale_purchase_automated/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
sale_purchase_automated/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
sale_purchase_automated/static/description/assets/icons/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
sale_purchase_automated/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
sale_purchase_automated/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
sale_purchase_automated/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
sale_purchase_automated/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
sale_purchase_automated/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
sale_purchase_automated/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
sale_purchase_automated/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
sale_purchase_automated/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
sale_purchase_automated/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
sale_purchase_automated/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
sale_purchase_automated/static/description/assets/modules/approval_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
sale_purchase_automated/static/description/assets/modules/budget_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
sale_purchase_automated/static/description/assets/modules/export_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
sale_purchase_automated/static/description/assets/modules/magento_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
sale_purchase_automated/static/description/assets/modules/pos_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
sale_purchase_automated/static/description/assets/modules/shopify_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
sale_purchase_automated/static/description/assets/screenshots/hero.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

BIN
sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-12.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-13.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-14.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
sale_purchase_automated/static/description/assets/screenshots/sale_purchase_automated-8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save