Browse Source

Merge pull request #1 from CybroOdoo/14.0

14.0
pull/218/head
Volodymyr Karabanov 2 years ago
committed by GitHub
parent
commit
42636a3641
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      base_accounting_kit/__manifest__.py
  2. 9
      base_accounting_kit/models/payment_matching.py
  3. 39
      duplicate_contact_details_alert/README.rst
  4. 23
      duplicate_contact_details_alert/__init__.py
  5. 41
      duplicate_contact_details_alert/__manifest__.py
  6. 6
      duplicate_contact_details_alert/doc/RELEASE_NOTES.md
  7. 24
      duplicate_contact_details_alert/models/__init__.py
  8. 66
      duplicate_contact_details_alert/models/res_config_settings.py
  9. 79
      duplicate_contact_details_alert/models/res_partner.py
  10. BIN
      duplicate_contact_details_alert/static/description/assets/icons/check.png
  11. BIN
      duplicate_contact_details_alert/static/description/assets/icons/chevron.png
  12. BIN
      duplicate_contact_details_alert/static/description/assets/icons/cogs.png
  13. BIN
      duplicate_contact_details_alert/static/description/assets/icons/consultation.png
  14. BIN
      duplicate_contact_details_alert/static/description/assets/icons/ecom-black.png
  15. BIN
      duplicate_contact_details_alert/static/description/assets/icons/education-black.png
  16. BIN
      duplicate_contact_details_alert/static/description/assets/icons/hotel-black.png
  17. BIN
      duplicate_contact_details_alert/static/description/assets/icons/license.png
  18. BIN
      duplicate_contact_details_alert/static/description/assets/icons/lifebuoy.png
  19. BIN
      duplicate_contact_details_alert/static/description/assets/icons/logo.png
  20. BIN
      duplicate_contact_details_alert/static/description/assets/icons/manufacturing-black.png
  21. BIN
      duplicate_contact_details_alert/static/description/assets/icons/pos-black.png
  22. BIN
      duplicate_contact_details_alert/static/description/assets/icons/puzzle.png
  23. BIN
      duplicate_contact_details_alert/static/description/assets/icons/restaurant-black.png
  24. BIN
      duplicate_contact_details_alert/static/description/assets/icons/service-black.png
  25. BIN
      duplicate_contact_details_alert/static/description/assets/icons/trading-black.png
  26. BIN
      duplicate_contact_details_alert/static/description/assets/icons/training.png
  27. BIN
      duplicate_contact_details_alert/static/description/assets/icons/update.png
  28. BIN
      duplicate_contact_details_alert/static/description/assets/icons/user.png
  29. BIN
      duplicate_contact_details_alert/static/description/assets/icons/wrench.png
  30. BIN
      duplicate_contact_details_alert/static/description/assets/modules/budget_image.png
  31. BIN
      duplicate_contact_details_alert/static/description/assets/modules/credit_image.png
  32. BIN
      duplicate_contact_details_alert/static/description/assets/modules/employee_image.png
  33. BIN
      duplicate_contact_details_alert/static/description/assets/modules/export_image.png
  34. BIN
      duplicate_contact_details_alert/static/description/assets/modules/gantt_image.png
  35. BIN
      duplicate_contact_details_alert/static/description/assets/modules/quotation_image.png
  36. BIN
      duplicate_contact_details_alert/static/description/assets/screenshots/dup_con1.png
  37. BIN
      duplicate_contact_details_alert/static/description/assets/screenshots/dup_con2.png
  38. BIN
      duplicate_contact_details_alert/static/description/assets/screenshots/hero.gif
  39. BIN
      duplicate_contact_details_alert/static/description/banner.png
  40. BIN
      duplicate_contact_details_alert/static/description/icon.png
  41. 559
      duplicate_contact_details_alert/static/description/index.html
  42. 39
      duplicate_contact_details_alert/views/res_config_settings_views.xml
  43. 41
      hide_cost_price/README.rst
  44. 22
      hide_cost_price/__init__.py
  45. 43
      hide_cost_price/__manifest__.py
  46. 6
      hide_cost_price/doc/RELEASE_NOTES.md
  47. 11
      hide_cost_price/security/view_cost_price.xml
  48. BIN
      hide_cost_price/static/description/assets/icons/chevron.png
  49. BIN
      hide_cost_price/static/description/assets/icons/cogs.png
  50. BIN
      hide_cost_price/static/description/assets/icons/consultation.png
  51. BIN
      hide_cost_price/static/description/assets/icons/ecom-black.png
  52. BIN
      hide_cost_price/static/description/assets/icons/education-black.png
  53. BIN
      hide_cost_price/static/description/assets/icons/hotel-black.png
  54. BIN
      hide_cost_price/static/description/assets/icons/license.png
  55. BIN
      hide_cost_price/static/description/assets/icons/lifebuoy.png
  56. BIN
      hide_cost_price/static/description/assets/icons/manufacturing-black.png
  57. BIN
      hide_cost_price/static/description/assets/icons/pos-black.png
  58. BIN
      hide_cost_price/static/description/assets/icons/puzzle.png
  59. BIN
      hide_cost_price/static/description/assets/icons/restaurant-black.png
  60. BIN
      hide_cost_price/static/description/assets/icons/service-black.png
  61. BIN
      hide_cost_price/static/description/assets/icons/trading-black.png
  62. BIN
      hide_cost_price/static/description/assets/icons/training.png
  63. BIN
      hide_cost_price/static/description/assets/icons/update.png
  64. BIN
      hide_cost_price/static/description/assets/icons/user.png
  65. BIN
      hide_cost_price/static/description/assets/icons/wrench.png
  66. BIN
      hide_cost_price/static/description/banner.png
  67. BIN
      hide_cost_price/static/description/icon.png
  68. BIN
      hide_cost_price/static/description/images/checked.png
  69. BIN
      hide_cost_price/static/description/images/hero.png
  70. BIN
      hide_cost_price/static/description/images/modules/approval_image.png
  71. BIN
      hide_cost_price/static/description/images/modules/dynamic_image.png
  72. BIN
      hide_cost_price/static/description/images/modules/mulitple-ref_image.png
  73. BIN
      hide_cost_price/static/description/images/modules/pos_image.png
  74. BIN
      hide_cost_price/static/description/images/modules/shopify_image.png
  75. BIN
      hide_cost_price/static/description/images/screen1.png
  76. BIN
      hide_cost_price/static/description/images/screen2.png
  77. BIN
      hide_cost_price/static/description/images/screen3.png
  78. 535
      hide_cost_price/static/description/index.html
  79. 60
      hide_cost_price/views/hide_product_cost.xml
  80. 2
      hide_menu_user/__manifest__.py
  81. 8
      hide_menu_user/models/res_user.py
  82. 2
      hr_payroll_dashboard/__manifest__.py
  83. 100
      hr_payroll_dashboard/models/employee.py
  84. 16
      hr_payroll_dashboard/static/src/js/hr_payroll_dashboard.js
  85. 22
      hr_payroll_dashboard/static/src/xml/payroll_dashboard.xml
  86. 44
      insta_feed_snippet/README.rst
  87. 2
      insta_feed_snippet/__init__.py
  88. 44
      insta_feed_snippet/__manifest__.py
  89. 1
      insta_feed_snippet/controllers/__init__.py
  90. 30
      insta_feed_snippet/controllers/main.py
  91. 7
      insta_feed_snippet/doc/RELEASE_NOTES.md
  92. 2
      insta_feed_snippet/models/__init__.py
  93. 27
      insta_feed_snippet/models/insta_post.py
  94. 81
      insta_feed_snippet/models/insta_profile.py
  95. 4
      insta_feed_snippet/security/ir.model.access.csv
  96. BIN
      insta_feed_snippet/static/description/assets/icons/check.png
  97. BIN
      insta_feed_snippet/static/description/assets/icons/chevron.png
  98. BIN
      insta_feed_snippet/static/description/assets/icons/cogs.png
  99. BIN
      insta_feed_snippet/static/description/assets/icons/consultation.png
  100. BIN
      insta_feed_snippet/static/description/assets/icons/ecom-black.png

2
base_accounting_kit/__manifest__.py

@ -22,7 +22,7 @@
{
'name': 'Odoo 14 Full Accounting Kit',
'version': '14.0.3.13.14',
'version': '14.0.3.13.16',
'category': 'Accounting',
'live_test_url': 'https://www.youtube.com/watch?v=peAp2Tx_XIs',
'summary': """ Asset and Budget Management,

9
base_accounting_kit/models/payment_matching.py

@ -234,7 +234,6 @@ class AccountReconciliation(models.AbstractModel):
results = self.get_bank_statement_line_data(bank_statement_lines.ids)
bank_statement_lines_left = self.env['account.bank.statement.line'].browse([line['st_line']['id'] for line in results['lines']])
bank_statements_left = bank_statement_lines_left.mapped('statement_id')
results.update({
'statement_name': len(bank_statements_left) == 1 and bank_statements_left.name or False,
'journal_id': bank_statements and bank_statements[0].journal_id.id or False,
@ -253,7 +252,6 @@ class AccountReconciliation(models.AbstractModel):
'ids': results['reconciled_aml_ids'],
}
})
return results
@api.model
@ -731,10 +729,9 @@ class AccountReconciliation(models.AbstractModel):
amount_currency = amount
amount_currency_str = ""
amount_str = formatLang(self.env, abs(amount), currency_obj=st_line.currency_id or statement_currency)
data = {
'id': st_line.id,
'ref': st_line.ref,
'payment_ref': st_line.payment_ref,
'note': st_line.narration or "",
'name': st_line.name,
'date': format_date(self.env, st_line.date),
@ -756,7 +753,6 @@ class AccountReconciliation(models.AbstractModel):
}
if st_line.partner_id:
data['open_balance_account_id'] = amount > 0 and st_line.partner_id.property_account_receivable_id.id or st_line.partner_id.property_account_payable_id.id
return data
@api.model
@ -1129,9 +1125,8 @@ class AccountBankStatementLine(models.Model):
elif self.move_name:
raise UserError(_('Operation not allowed. Since your statement line already received a number (%s), you cannot reconcile it entirely with existing journal entries otherwise it would make a gap in the numbering. You should book an entry and make a regular revert of it in case you want to cancel it.')% (self.move_name))
# create the res.partner.bank if needed
if self.account_number and self.partner_id and not self.bank_account_id:
if self.account_number and self.partner_id and not self.statement_id:
# Search bank account without partner to handle the case the res.partner.bank already exists but is set
# on a different partner.
self.partner_bank_id = self._find_or_create_bank_account()

39
duplicate_contact_details_alert/README.rst

@ -0,0 +1,39 @@
Duplicate Contact Details Alert
===============================
* Duplicate Contact Details Alert module for Odoo 14.
Installation
============
- www.odoo.com/documentation/14.0/setup/install.html
- Install our custom addon
License
-------
General Public License, Version 3 (AGPL v3).
(https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html)
Company
-------
* 'Cybrosys Techno Solutions <https://cybrosys.com/>'__
Credits
-------
* 'Cybrosys Techno Solutions <https://cybrosys.com/>'__
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
==========
This module is maintained by Cybrosys Technologies.
For support and more information, please visit https://www.cybrosys.com
Further information
===================
HTML Description: `<static/description/index.html>`__

23
duplicate_contact_details_alert/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models

41
duplicate_contact_details_alert/__manifest__.py

@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': "Duplicate Contact Details Alert",
'version': '14.0.1.0.0',
'summary': """Duplicate Contact Details Alert""",
"category": 'Extra Tools',
'description': """Duplicate Contact Details Alert""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'depends': ['base', 'contacts'],
'data': [
'views/res_config_settings_views.xml',
],
'images': ['static/description/banner.png'],
'license': "LGPL-3",
'installable': True,
'application': False,
'auto_install': False,
}

6
duplicate_contact_details_alert/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <duplicate_contact_details_alert>
#### 24.10.2022
#### Version 14.0.1.0.0
#### ADD
- Initial commit for Duplicate Contact Details Alert Module

24
duplicate_contact_details_alert/models/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import res_partner
from . import res_config_settings

66
duplicate_contact_details_alert/models/res_config_settings.py

@ -0,0 +1,66 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models
from ast import literal_eval
class ResConfig(models.TransientModel):
_inherit = 'res.config.settings'
def _get_contacts_fields_domain(self):
return [
('model', '=', 'res.partner'), ('store', '=', True),
('ttype', 'in', ['binary', 'char'])]
is_unique_contact = fields.Boolean(string="Unique Contacts Alert")
unique_contact_ids = fields.Many2many(
'ir.model.fields', string='Contact Fields',
domain=_get_contacts_fields_domain,
help='Warning to avoid duplication of customer/vendor'
' details in the system')
def set_values(self):
super(ResConfig, self).set_values()
self.env['ir.config_parameter'].set_param(
'duplicate_contact_details_alert.is_unique_contact',
self.is_unique_contact)
self.env['ir.config_parameter'].set_param(
'duplicate_contact_details_alert.unique_contact_ids',
self.unique_contact_ids.ids)
@api.model
def get_values(self):
res = super(ResConfig, self).get_values()
params = self.env['ir.config_parameter'].sudo()
contact_field_ids = params.get_param(
'duplicate_contact_details_alert.unique_contact_ids')
if contact_field_ids:
res.update(
is_unique_contact=params.get_param(
'duplicate_contact_details_alert.is_unique_contact'),
unique_contact_ids=[(6, 0, literal_eval(contact_field_ids))],
)
return res
else:
return res

79
duplicate_contact_details_alert/models/res_partner.py

@ -0,0 +1,79 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models, _
from odoo.exceptions import UserError, ValidationError
import ast
class ResPartner(models.Model):
_inherit = 'res.partner'
@api.model
def create(self, vals):
unique_contact_ids = self.env[
'ir.config_parameter'].sudo().get_param(
'duplicate_contact_details_alert.unique_contact_ids')
if unique_contact_ids:
fields_list = ast.literal_eval(unique_contact_ids)
for x in fields_list:
contact_fields = self.env['ir.model.fields'].browse(x)
field_vals = contact_fields.name
if vals.get(field_vals):
partner = self.env['res.partner'].search(
[(field_vals, '=', vals.get(field_vals))], limit=1)
if partner:
raise ValidationError(
_("The %s is already"
" used for contact %s.") %
(contact_fields.name, partner.name))
else:
res = super(ResPartner, self).create(vals)
return res
else:
res = super(ResPartner, self).create(vals)
return res
def write(self, vals):
unique_contact_ids = self.env[
'ir.config_parameter'].sudo().get_param(
'duplicate_contact_details_alert.unique_contact_ids')
if unique_contact_ids:
fields_list = ast.literal_eval(unique_contact_ids)
for x in fields_list:
contact_fields = self.env['ir.model.fields'].browse(x)
field_vals = contact_fields.name
if vals.get(field_vals):
partner = self.env['res.partner'].search(
[(field_vals, '=', vals.get(field_vals))], limit=1)
if partner:
raise ValidationError(
_("The %s is already"
" used for contact %s.") %
(contact_fields.name, partner.name))
else:
res = super(ResPartner, self).write(vals)
return res
else:
res = super(ResPartner, self).write(vals)
return res

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
duplicate_contact_details_alert/static/description/assets/modules/credit_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
duplicate_contact_details_alert/static/description/assets/modules/employee_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
duplicate_contact_details_alert/static/description/assets/modules/gantt_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
duplicate_contact_details_alert/static/description/assets/modules/quotation_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
duplicate_contact_details_alert/static/description/assets/screenshots/dup_con1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
duplicate_contact_details_alert/static/description/assets/screenshots/dup_con2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

BIN
duplicate_contact_details_alert/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
duplicate_contact_details_alert/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
duplicate_contact_details_alert/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

559
duplicate_contact_details_alert/static/description/index.html

@ -0,0 +1,559 @@
<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>
</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;">
Duplicate Contact Alert</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;">
Duplicate contact alert module helps to detect duplicate contact values.
</p>
<img src="./assets/screenshots/hero.gif" 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 class="row">
<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="#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>
</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;">
The Duplicate contact alert module helps to detect duplicate contact values. When a user enters the same value in the contact, it returns a validation error message, which helps customers prevent duplicate entries.
</p>
</div>
</p>
</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;">
Select Multiple Fields</h4>
<p style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
User can select multiple fields to check for duplicate values.</h4>
</h4>
</p>
</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;">
Validation Alert</h4>
<p style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
Validation warning is triggered when users enter duplicate values.</h4>
</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">
<h2 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.7rem !important;">
Enable the "Unique Contacts" button.</h2>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Go to Settings --> Enable "Unique Contacts" button and select Fields.
</p>
<img src="assets/screenshots/dup_con1.png" class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div class="col-lg-12 my-3">
<h2 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.7rem !important;">
Validation alert for duplicate contact values</h2>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1.3rem !important;">
When you enter the same value in the contact fields, it raises a validation error message.
</p>
<img src="assets/screenshots/dup_con2.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/15.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/15.0/custom_gantt_view/" 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/gantt_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/15.0/sales_credit_limit/" 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/credit_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/15.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/15.0/product_to_quotation/" 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/quotation_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/15.0/employee_documents_expiry/"
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/employee_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>+91 86068 27707</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>

39
duplicate_contact_details_alert/views/res_config_settings_views.xml

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_contacts_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.duplicate_contact_details_alert</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='contacts_settings']" position="inside">
<div id="unique_contact_settings">
<div class='row mt16 o_settings_container'
name="contact_alert_setting_container">
<div class="col-12 col-lg-6 o_setting_box"
id="contact_alert">
<div class="o_setting_left_pane">
<field name="is_unique_contact"/>
</div>
<div class="o_setting_right_pane">
<span class="o_form_label">Unique Contacts
</span>
<div class="text-muted">Validation alerts for duplicate contact details</div>
<div class="row mt16"
attrs="{'invisible': [('is_unique_contact', '=', False)]}">
<label for="unique_contact_ids"
class="col-lg-4 o_light_label"/>
<field name="unique_contact_ids"
widget="many2many_tags"
class="oe_inline"/>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

41
hide_cost_price/README.rst

@ -0,0 +1,41 @@
Hide Product Cost Price v14
===========================
The cost price of the product will be only visible for the users added in the group "view cost price".
If user is not there in the group, the cost price of the product will remain invisible for the user.
By default administrator will be added to this group
Depends
=======
[product] addon Odoo
Tech
====
* [XML] - Odoo views
Installation
============
- www.odoo.com/documentation/14.0/setup/install.html
- Install our custom addon
License
=======
GNU AGPL, Version 3 (AGPLv3)
(http://www.gnu.org/licenses/agpl.html)
Bug Tracker
===========
Contact odoo@cybrosys.com
Authors
-------
* Sonu Soman <sonu@cybrosys.info>
Maintainer
----------
This module is maintained by Cybrosys Technologies.
For support and more information, please visit https://www.cybrosys.com.

22
hide_cost_price/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################

43
hide_cost_price/__manifest__.py

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
{
'name': 'Hide Product Cost Price',
'summary': """Product Cost Price Will be Visible Only for Specified Group""",
'version': '14.0.1.0.0',
'description': """Product cost price will be visible only for specified group""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'category': 'Extra Tools',
'depends': ['base', 'product'],
'license': 'AGPL-3',
'data': [
'security/view_cost_price.xml',
'views/hide_product_cost.xml'
],
'images': ['static/description/banner.png'],
'installable': True,
'auto_install': False,
}

6
hide_cost_price/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <hide_cost_price>
#### 22.07.2021
#### Version 14.0.1.0.0
##### ADD
- Initial commit

11
hide_cost_price/security/view_cost_price.xml

@ -0,0 +1,11 @@
<?xml version="1.0"?>
<odoo>
<data>
<record id="view_cost_price" model="res.groups">
<field name="name">View Cost Price</field>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>
</data>
</odoo>

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
hide_cost_price/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
hide_cost_price/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
hide_cost_price/static/description/images/checked.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
hide_cost_price/static/description/images/hero.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
hide_cost_price/static/description/images/modules/approval_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
hide_cost_price/static/description/images/modules/dynamic_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
hide_cost_price/static/description/images/modules/mulitple-ref_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
hide_cost_price/static/description/images/modules/pos_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
hide_cost_price/static/description/images/modules/shopify_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
hide_cost_price/static/description/images/screen1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
hide_cost_price/static/description/images/screen2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

BIN
hide_cost_price/static/description/images/screen3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

535
hide_cost_price/static/description/index.html

@ -0,0 +1,535 @@
<div style="padding: 3.5rem 1.5rem !important; background-color: #ffffff !important;">
<div class="container">
<!-- HERO -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 1rem !important;">
<h1 class="text-center" style="color: #212121 !important; font-size: 3rem !important;"><span
style="font-weight: 700 !important;">Hide Product Cost Price</span></h1>
<p class="text-center"
style="color: #212529 !important; font-size: 1.5rem !important; letter-spacing: 1px !important;">
Cost price will be visible only for selected users</p>
<img src="./images/hero.png" class="img-responsive">
</div>
</div>
<!-- END OF HERO -->
<!-- OVERVIEW -->
<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;">Overview</h2>
<hr
style="border: 3px solid #AC1015 !important; background-color: #AC1015 !important; width: 80px !important; margin-bottom: 2rem !important;" />
<p class="text-center" style="color: #212529 !important; font-size: 1.5rem !important;">
With the module create a custom new group, add users to this group and only the memebers of this
group can view the cost price of the product.
</p>
</div>
</div>
<!-- END OF OVERVIEW -->
<!-- KEY FEATURES -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center" style="padding: 2.5rem 1rem !important;">
<h2 class="text-center" style="color: #212529 !important;">Key Features</h2>
<hr
style="border: 3px solid #AC1015 !important; background-color: #AC1015 !important; width: 80px !important; margin-bottom: 2rem !important;" />
<div class="row">
<div class="col-lg-12">
<div class="d-flex deep-2"
style="height: 60px !important; padding: 1rem 1.5rem !important; border-radius: 0 !important; margin: 1.5rem 0">
<img src="./images/checked.png" style="height: 24px !important; width: 24px !important;"
class="mt-1 mr-2" height="24px" width="24px">
<p style="color: #212529 !important; font-size: 1.3rem !important;">
Cost price visibility restricted.
</p>
</div>
<div class="d-flex deep-2"
style="height: 60px !important; padding: 1rem 1.5rem !important; border-radius: 0 !important; margin: 1.5rem 0">
<img src="./images/checked.png" style="height: 24px !important; width: 24px !important;"
class="mt-1 mr-2" height="24px" width="24px">
<p style="color: #212529 !important; font-size: 1.3rem !important;">
Visible only for the users in the group.
</p>
</div>
<div class="d-flex deep-2"
style="height: 60px !important; padding: 1rem 1.5rem !important; border-radius: 0 !important; margin: 1.5rem 0">
<img src="./images/checked.png" style="height: 24px !important; width: 24px !important;"
class="mt-1 mr-2" height="24px" width="24px">
<p style="color: #212529 !important; font-size: 1.3rem !important;">
By default administrator will be added to this group.
</p>
</div>
</div>
</div>
</div>
</div>
<!-- END OF KEY FEATURES -->
<!-- SCREENSHOTS -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center" style="padding: 2.5rem 1rem !important;">
<h2 style="text-align: center; color: #212529 !important;">Screenshots</h2>
<hr
style="border: 3px solid #AC1015 !important; background-color: #AC1015 !important; width: 80px !important; margin-bottom: 2rem !important;" />
<!-- img -->
<div class="d-flex m-0" style="border-bottom: 1px solid #e5e5e5 !important;">
<div class="mr-3">
<h3
style="font-size: 2rem !important; font-weight: 800 !important; color: #ffffff !important; background-color: #AC1015 !important; padding: 1rem !important; width: 70px !important; height: 75px !important;">
01</h3>
</div>
<div>
<h3 style="font-size: 1.7rem !important; font-weight: 600 !important;">
Adding user to the View Cost Price group
</h3>
<p
style="color: #212529 !important; font-size: 1.3rem !important; font-weight: 300 !important;">
User will see the product cost price only if he is added in this group.
</p>
</div>
</div>
<img src="./images/screen1.png" class="img-responsive border"
style="margin-top: -15px !important; margin-top: 1rem !important; margin-bottom: 4rem !important;">
<!-- endo of img -->
<!-- img -->
<div class="d-flex m-0" style="border-bottom: 1px solid #e5e5e5 !important;">
<div class="mr-3">
<h3
style="font-size: 2rem !important; font-weight: 800 !important; color: #ffffff !important; background-color: #AC1015 !important; padding: 1rem !important; width: 70px !important; height: 75px !important;">
02</h3>
</div>
<div>
<h3 style="font-size: 1.7rem !important; font-weight: 600 !important;">
Product View for users not in the Group
</h3>
<p
style="color: #212529 !important; font-size: 1.3rem !important; font-weight: 300 !important;">
Product form view without cost price.
</p>
</div>
</div>
<img src="./images/screen3.png" class="img-responsive border"
style="margin-top: -15px !important; margin-top: 1rem !important; margin-bottom: 4rem !important;">
<!-- endo of img -->
<div class="d-flex m-0" style="border-bottom: 1px solid #e5e5e5 !important;">
<div class="mr-3">
<h3
style="font-size: 2rem !important; font-weight: 800 !important; color: #ffffff !important; background-color: #AC1015 !important; padding: 1rem !important; width: 70px !important; height: 75px !important;">
03</h3>
</div>
<div>
<h3 style="font-size: 1.7rem !important; font-weight: 600 !important;">
Product tree view without cost price
</h3>
<p
style="color: #212529 !important; font-size: 1.3rem !important; font-weight: 300 !important;">
Product tree view without cost price.
</p>
</div>
</div>
<img src="./images/screen2.png" class="img-responsive border"
style="margin-top: -15px !important; margin-top: 1rem !important; margin-bottom: 4rem !important;">
<!-- endo of img -->
</div>
</div>
<!-- END OF SCREENSHOTS -->
<!-- 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 #AC1015 !important; background-color: #AC1015 !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/dynamic_accounts_report/"
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="./images/modules/dynamic_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="./images/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="./images/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/multiple_reference_per_product/"
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="./images/modules/mulitple-ref_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="./images/modules/shopify_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 #AC1015 !important; background-color: #AC1015 !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 #AC1015 !important; background-color: #AC1015 !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 #AC1015 !important; background-color: #AC1015 !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-4">
<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-4">
<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 class="col-lg-4">
<a href="mailto:info@cybrosys.com" target="_blank" class="btn btn-block deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>info@cybrosys.com</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>
</div>

60
hide_cost_price/views/hide_product_cost.xml

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<!-- Product Template Form View -->
<record model="ir.ui.view" id="product_form_hide_cost">
<field name="name">product.template.cost</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<xpath expr="//label[@for='standard_price']" position="attributes">
<attribute name="groups">hide_cost_price.view_cost_price</attribute>
</xpath>
<xpath expr="//field[@name='standard_price']" position="attributes">
<attribute name="groups">hide_cost_price.view_cost_price</attribute>
</xpath>
</field>
</record>
<!-- Product Variant Form View -->
<record model="ir.ui.view" id="product_variant_form_hide_cost">
<field name="name">product.product.cost</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<xpath expr="//label[@for='standard_price']" position="attributes">
<attribute name="groups">hide_cost_price.view_cost_price</attribute>
</xpath>
<xpath expr="//field[@name='standard_price']" position="attributes">
<attribute name="groups">hide_cost_price.view_cost_price</attribute>
</xpath>
</field>
</record>
<!-- Product Template Tree View -->
<record model="ir.ui.view" id="product_tree_hide_cost">
<field name="name">product.template.cost</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='standard_price']" position="attributes">
<attribute name="groups">hide_cost_price.view_cost_price</attribute>
</xpath>
</field>
</record>
<!-- Product Variant Tree View -->
<record model="ir.ui.view" id="product_product_tree_hide_cost">
<field name="name">product.product.cost</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_product_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='standard_price']" position="attributes">
<attribute name="groups">hide_cost_price.view_cost_price</attribute>
</xpath>
</field>
</record>
</data>
</odoo>

2
hide_menu_user/__manifest__.py

@ -22,7 +22,7 @@
{
'name': 'Hide Any Menu User Wise',
'version': '14.0.1.0.0',
'version': '14.0.1.0.1',
'summary': 'Hide Any Menu Item User Wise',
'description': 'Hide Any Menu Item User Wise, Hide Menu Items, Hide Menu',
'author': 'Cybrosys Techno Solutions',

8
hide_menu_user/models/res_user.py

@ -22,15 +22,15 @@
from odoo import models, fields, api
class HideMenuUser(models.Model):
_inherit = 'res.users'
@api.model
def create(self, vals):
@api.model_create_multi
def create(self, vals_list):
"""
Else the menu will be still hidden even after removing from the list
"""
for vals in vals_list:
self.clear_caches()
return super(HideMenuUser, self).create(vals)
@ -43,6 +43,7 @@ class HideMenuUser(models.Model):
menu.write({
'restrict_user_ids': [(4, self.id)]
})
print(res,'resssssssssss')
self.clear_caches()
return res
@ -61,7 +62,6 @@ class HideMenuUser(models.Model):
'hidden to this user ')
is_admin = fields.Boolean(compute=_get_is_admin)
class RestrictMenu(models.Model):
_inherit = 'ir.ui.menu'

2
hr_payroll_dashboard/__manifest__.py

@ -21,7 +21,7 @@
#############################################################################
{
'name': "HR Payroll Dashboard",
'version': '14.0.1.0.0',
'version': '14.0.1.1.1',
'summary': """HR Payroll Dashboard""",
'description': """HR Payroll Dashboard""",
'category': 'Human Resource',

100
hr_payroll_dashboard/models/employee.py

@ -47,37 +47,38 @@ class Employee(models.Model):
def get_user_employee_info(self):
"""To get the employee information"""
uid = request.session.uid
employee_id = self.env['hr.employee'].sudo().search([
('user_id', '=', uid)], limit=1)
employee_user_id = self.env['hr.employee'].sudo().search([
('user_id', '=', uid)
], limit=1)
employee = self.env['hr.employee'].sudo().search_read([
('user_id', '=', uid)], limit=1)
attendance_count = self.env['hr.attendance'].sudo().search(
[('employee_id', '=', employee_id.id),
[('employee_id', '=', employee_user_id.id),
('attendance_date', '=', date.today())])
manager_attendance_count = self.env['hr.attendance'].sudo().search(
[('attendance_date', '=', date.today())])
leave_request_count = self.env['hr.leave'].sudo().search(
[('employee_id', '=', employee_id.id),
[('employee_id', '=', employee_user_id.id),
('request_date_from', '=', date.today())])
manager_leave_request = self.env['hr.leave'].sudo().search(
[('request_date_from', '=', date.today())])
employee_contracts = self.env['hr.contract'].sudo().search([
('employee_id', '=', employee_id.id)])
('employee_id', '=', employee_user_id.id)])
payslips = self.env['hr.payslip'].sudo().search([
('employee_id', '=', employee_id.id)])
('employee_id', '=', employee_user_id.id)])
salary_rules = self.env['hr.salary.rule'].sudo().search([])
salary_structures = self.env['hr.payroll.structure'].sudo().search([])
salary_rule_count = len(salary_rules)
salary_structure_count = len(salary_structures)
emp_leave = len(manager_leave_request) if employee_id.is_manager \
emp_leave = len(manager_leave_request) if employee_user_id.is_manager \
else len(leave_request_count)
payslip_count = len(payslips) if not employee_id.is_manager \
payslip_count = len(payslips) if not employee_user_id.is_manager \
else len(self.env['hr.payslip'].sudo().search([]))
emp_contracts_count = len(employee_contracts) \
if not employee_id.is_manager else len(
if not employee_user_id.is_manager else len(
self.env['hr.contract'].sudo().search([]))
attendance_today = len(manager_attendance_count) \
if employee_id.is_manager else len(attendance_count)
if employee_user_id.is_manager else len(attendance_count)
if employee:
data = {
'emp_timesheets': attendance_today,
@ -128,20 +129,34 @@ class Employee(models.Model):
@api.model
def get_department_leave(self):
"""return department wise leave details"""
employee = False
month_list = []
graph_result = []
uid = request.session.uid
employee_user = self.env['hr.employee'].sudo().search_read([
('user_id', '=', uid)
], limit=1)
employees = self.env['hr.employee'].sudo().search_read([], limit=1)
if employee_user:
employee = self.env['hr.employee'].sudo().search_read([
('user_id', '=', uid)], limit=1)
employee_id = self.env['hr.employee'].browse(
employee[0]['id'])
elif employees:
employee = self.env['hr.employee'].sudo().search_read([], limit=1)
employee_id = self.env['hr.employee'].browse(
employee[0]['id'])
for i in range(5, -1, -1):
last_month = datetime.now() - relativedelta(months=i)
text = format(last_month, '%B %Y')
month_list.append(text)
self.env.cr.execute("""select id, name from hr_department
where active=True""")
departments = self.env.cr.dictfetchall()
department_list = [x['name'] for x in departments]
for month in month_list:
leave = {}
for dept in departments:
@ -151,8 +166,8 @@ class Employee(models.Model):
'leave': leave
}
graph_result.append(vals)
employee_id = self.env['hr.employee'].browse(employee[0]['id'])
if employee:
sql = """
SELECT h.id, h.employee_id,h.department_id
, extract('month' FROM y)::int AS leave_month
@ -172,6 +187,7 @@ class Employee(models.Model):
self.env.cr.execute(sql)
results = self.env.cr.dictfetchall()
leave_lines = []
for line in results:
employee = self.browse(line['employee_id'])
from_dt = fields.Datetime.from_string(line['date_from'])
@ -184,6 +200,7 @@ class Employee(models.Model):
'days': days
}
leave_lines.append(vals)
if leave_lines:
df = pd.DataFrame(leave_lines)
rf = df.groupby(['l_month', 'department']).sum()
@ -191,25 +208,39 @@ class Employee(models.Model):
for month in month_list:
for line in result_lines:
if month.replace(' ', '') == line[0].replace(' ', ''):
match = list(filter(lambda d: d['l_month'] in [month],
match = list(filter(
lambda d: d['l_month'] in [month],
graph_result))[0]['leave']
dept_name = self.env['hr.department'].browse(
line[1]).name
if match:
match[dept_name] = result_lines[line]['days']
for result in graph_result:
result['l_month'] = result['l_month'].split(' ')[:1][0].strip()[:3] \
+ " " + result['l_month'].split(' ')[1:2][0]
result['l_month'] = result[
'l_month'
].split(' ')[:1][0].strip()[:3] + " " +\
result['l_month'].split(' ')[1:2][0]
return graph_result, department_list
else:
return False
@api.model
def get_employee_expense(self):
"""return employee expense details"""
month_list = []
graph_result = []
uid = request.session.uid
employee = False
employee_user = self.env['hr.employee'].sudo().search_read([
('user_id', '=', uid)
], limit=1)
employees = self.env['hr.employee'].sudo().search_read([], limit=1)
if employee_user:
employee = self.env['hr.employee'].sudo().search_read([
('user_id', '=', uid)], limit=1)
('user_id', '=', uid)
], limit=1)
elif employees:
employees = self.env['hr.employee'].sudo().search_read([], limit=1)
for i in range(5, -1, -1):
last_month = datetime.now() - relativedelta(months=i)
@ -228,6 +259,7 @@ class Employee(models.Model):
'leave': leave
}
graph_result.append(vals)
if employee:
employee_id = self.env['hr.employee'].browse(employee[0]['id'])
sql = """
@ -269,6 +301,8 @@ class Employee(models.Model):
result['l_month'] = result['l_month'].split(' ')[:1][0].strip()[:3] \
+ " " + result['l_month'].split(' ')[1:2][0]
return graph_result, department_list
else:
return False
@api.model
def employee_leave_trend(self):
@ -281,8 +315,19 @@ class Employee(models.Model):
text = format(last_month, '%B %Y')
month_list.append(text)
uid = request.session.uid
employee = False
employee_user = self.env['hr.employee'].sudo().search_read([
('user_id', '=', uid)
], limit=1)
employees = self.env['hr.employee'].sudo().search_read([], limit=1)
if employee_user:
employee = self.env['hr.employee'].sudo().search_read([
('user_id', '=', uid)], limit=1)
('user_id', '=', uid)
], limit=1)
elif employees:
employee = self.env['hr.employee'].sudo().search_read([], limit=1)
for month in month_list:
vals = {
'l_month': month,
@ -305,6 +350,7 @@ class Employee(models.Model):
date_trunc('month', now())
and h.employee_id = %s
"""
if employee:
self.env.cr.execute(sql, (employee[0]['id'],))
results = self.env.cr.dictfetchall()
for line in results:
@ -331,6 +377,8 @@ class Employee(models.Model):
result['l_month'] = result['l_month'].split(' ')[:1][0].strip()[:3] \
+ " " + result['l_month'].split(' ')[1:2][0]
return graph_result
else:
return False
class Contract(models.Model):
@ -383,15 +431,29 @@ class HrExpense(models.Model):
last_month = datetime.now() - relativedelta(months=i)
text = format(last_month, '%B %Y')
month_list.append(text)
for month in month_list:
vals = {
'l_month': month,
'count': 0
}
approved_trend.append(vals)
uid = request.session.uid
employee = False
employee_user = self.env['hr.employee'].sudo().search_read([
('user_id', '=', uid)
], limit=1)
employees = self.env['hr.employee'].sudo().search_read([], limit=1)
if employee_user:
employee = self.env['hr.employee'].sudo().search_read([
('user_id', '=', uid)], limit=1)
('user_id', '=', uid)
], limit=1)
elif employees:
employee = self.env['hr.employee'].sudo().search_read([], limit=1)
if employee:
employee_id = self.env['hr.employee'].browse(employee[0]['id'])
if not employee_id.is_manager:
sql = ('''select to_char(date, 'Month YYYY') as l_month,
@ -424,6 +486,8 @@ class HrExpense(models.Model):
'values': approved_trend
}]
return graph_result
else:
return False
class HrAttendance(models.Model):

16
hr_payroll_dashboard/static/src/js/hr_payroll_dashboard.js

@ -223,6 +223,7 @@ var PayrollDashboard = AbstractAction.extend({
model: "hr.expense",
method: "get_employee_expense",
}).then(function (data) {
if(data){
data.forEach(function(d) {
d.values.forEach(function(d) {
d.l_month = d.l_month;
@ -295,8 +296,7 @@ var PayrollDashboard = AbstractAction.extend({
.attr("cx", function(d) { return x(d.l_month)})
.attr("cy", function(d) { return y(d.count)})
.attr("r", 3);
}
});
},
@ -309,6 +309,7 @@ var PayrollDashboard = AbstractAction.extend({
model: "hr.employee",
method: "get_department_leave",
}).then(function (data) {
if (data){
var fData = data[0];
var dept = data[1];
var id = self.$('.leave_graph')[0];
@ -515,6 +516,7 @@ var PayrollDashboard = AbstractAction.extend({
var hG = histoGram(sF), // create the histogram.
pC = pieChart(tF), // create the pie-chart.
leg= legend(tF); // create the legend.
}
});
},
render_graphs: function(){
@ -543,6 +545,7 @@ var PayrollDashboard = AbstractAction.extend({
method: "get_employee_time_off",
}).then(function (data) {
if (data){
var segColor = {};
var vis = d3.select(elem[0]).append("svg:svg").data([data]).attr("width", w).attr("height", h).append("svg:g").attr("transform", "translate(" + r + "," + r + ")");
var pie = d3.layout.pie().value(function(d){return d.value;});
@ -572,7 +575,7 @@ var PayrollDashboard = AbstractAction.extend({
// create the third column for each segment.
tr.append("td").attr("class",'legendFreq').attr("style","border: 5px solid transparent; font-weight: bold;")
.text(function(d){ return d.value;});
}
});
},
@ -590,6 +593,7 @@ var PayrollDashboard = AbstractAction.extend({
model: "hr.payslip",
method: "get_employee_payslips",
}).then(function (data) {
if(data){
var segColor = {};
var vis = d3.select(elem[0]).append("svg:svg").data([data]).attr("width", w).attr("height", h).append("svg:g").attr("transform", "translate(" + r + "," + r + ")");
var pie = d3.layout.pie().value(function(d){return d.value;});
@ -619,6 +623,7 @@ var PayrollDashboard = AbstractAction.extend({
// create the third column for each segment.
tr.append("td").attr("class",'legendFreq').attr("style","border: 5px solid transparent; font-weight: bold;")
.text(function(d){ return d.value;});
}
});
},
@ -636,6 +641,7 @@ var PayrollDashboard = AbstractAction.extend({
model: "hr.contract",
method: "get_employee_contract",
}).then(function (data) {
if(data){
var segColor = {};
var vis = d3.select(elem[0]).append("svg:svg").data([data]).attr("width", w).attr("height", h).append("svg:g").attr("transform", "translate(" + r + "," + r + ")");
var pie = d3.layout.pie().value(function(d){return d.value;});
@ -665,6 +671,7 @@ var PayrollDashboard = AbstractAction.extend({
// create the third column for each segment.
tr.append("td").attr("class",'legendFreq').attr("style","border: 5px solid transparent; font-weight: bold;")
.text(function(d){ return d.value;});
}
});
},
@ -674,6 +681,7 @@ var PayrollDashboard = AbstractAction.extend({
model: "hr.employee",
method: "employee_leave_trend",
}).then(function (data) {
if(data){
var elem = self.$('.leave_trend');
var margin = {top: 30, right: 20, bottom: 30, left: 80},
width = 500 - margin.left - margin.right,
@ -760,7 +768,7 @@ var PayrollDashboard = AbstractAction.extend({
.style("text-anchor", "middle")
.attr("font-size", "12px")
.attr("font-weight", "bold");
}
});
},

22
hr_payroll_dashboard/static/src/xml/payroll_dashboard.xml

@ -6,6 +6,20 @@
</div>
</div>
</t>
<t t-name="EmployeeWarning">
<div class="row" style="margin-top:1%;margin-left:40%;">
<div class="col-md-12 ">
<div>
<div class="rounded mx-auto d-block">
<div>
<p style="color:red;">Error : Could not find employee linked to user</p>
<p style="color:red;">Please contact system admin for the setup</p>
</div>
</div>
</div>
</div>
</div>
</t>
<t t-name="EmployeeDetails">
<link rel="stylesheet"
href="/hr_payroll_dashboard/static/src/css/dashboard.css"/>
@ -83,7 +97,7 @@
<div class="oh-card-body">
<div class="stat-widget-one">
<div class="stat-icon" style="background:#FCF030">
<i class='fa fa-money'></i>
<i class='fa fa-money'/>
</div>
<div class="stat-content">
<div class="stat-head">Salary Rules</div>
@ -100,7 +114,7 @@
<div class="oh-card-body">
<div class="stat-widget-one">
<div class="stat-icon" style="background:#FFA742">
<i class='fa fa-money'></i>
<i class='fa fa-money'/>
</div>
<div class="stat-content">
<div class="stat-head">Salary Structures</div>
@ -175,8 +189,8 @@
</t>
<t t-name="PayrollManagerDashboard">
<br></br>
<br></br>
<br/>
<br/>
<div class="row" style="margin:0px;">
<div class="col-md-4" id="col-graph">
<div class="card">

44
insta_feed_snippet/README.rst

@ -0,0 +1,44 @@
.. 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
Insta Feed Snippet
===================
Insta Feed Snippet
Installation
============
- www.odoo.com/documentation/15.0/setup/install.html
- Install our custom addon
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
Credits
-------
* Developer:
vishnu@cybrosys.info
Version 14.0.1.0.0:
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 <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

2
insta_feed_snippet/__init__.py

@ -0,0 +1,2 @@
from . import models
from . import controllers

44
insta_feed_snippet/__manifest__.py

@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': 'Instagram Feed Snippet',
'version': '14.0.1.0.0',
'summary': 'Instagram Feed Snippet',
'description': """Instagram Feed Snippet""",
'category': 'Website',
'author': "Cybrosys Techno Solutions",
'website': "https://www.cybrosys.com",
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'license': 'LGPL-3',
'depends': ['base', 'product', 'website', 'website_sale', 'sale'],
'data': ['security/ir.model.access.csv',
'views/insta_post.xml',
'views/insta_profile.xml',
'views/snippet_structure_inherit.xml',
'views/website.xml'
],
'installable': True,
'application': True,
'auto_install': False,
}

1
insta_feed_snippet/controllers/__init__.py

@ -0,0 +1 @@
from . import main

30
insta_feed_snippet/controllers/main.py

@ -0,0 +1,30 @@
from odoo import http
from odoo.http import request
import time
class DashbaordCarousel(http.Controller):
@http.route('/get_dashbaord_carousel', auth="public", type='json')
def get_dashbaord_carousel(self):
events_per_slide = 3
records = request.env['insta.post'].sudo().search(
[])
records_grouped = []
record_list = []
for index, record in enumerate(records, 1):
record_list.append(record)
if index % events_per_slide == 0:
records_grouped.append(record_list)
record_list = []
if any(record_list):
records_grouped.append(record_list)
values = {
"objects": records_grouped,
"events_per_slide": events_per_slide,
"num_slides": len(records_grouped),
"uniqueId": "pc-%d" % int(time.time() * 1000),
}
print(len(records_grouped))
response = http.Response(
template='insta_feed_snippet.s_carousel_template_items', qcontext=values)
return response.render()

7
insta_feed_snippet/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <insta_feed_snippet>
#### 09.11.2022
#### Version 14.0.1.0.0
#### ADD
Initial Commit

2
insta_feed_snippet/models/__init__.py

@ -0,0 +1,2 @@
from . import insta_profile
from . import insta_post

27
insta_feed_snippet/models/insta_post.py

@ -0,0 +1,27 @@
from odoo import models, fields, api, _
import requests
from odoo.exceptions import UserError
class InstaPost(models.Model):
_name = 'insta.post'
name = fields.Char(string="Media ID")
caption = fields.Char("Caption")
post_image = fields.Binary(string='Post Image', attachment=True)
profile_id = fields.Many2one('insta.profile')
def action_update_post(self, access_token):
url = 'https://graph.facebook.com/v15.0/%s?fields=id,caption,comments_count,is_comment_enabled,like_count,media_product_type,media_type,media_url,owner,permalink,thumbnail_url,timestamp,username&access_token=%s' % (
self.name, access_token)
media_content = requests.get(url, timeout=5).json()
if not media_content.get('error'):
if media_content.get('caption'):
self.write({
'caption': media_content['caption'],
})
else:
raise UserError(_('%s', media_content['error']['message']))

81
insta_feed_snippet/models/insta_profile.py

@ -0,0 +1,81 @@
import base64
from odoo import models, fields, api, _
import requests
from odoo.exceptions import UserError
class InstaProfile(models.Model):
_name = 'insta.profile'
name = fields.Char(string="Name", readonly=True)
access_token = fields.Text("Access Token")
username = fields.Char('Username', readonly=True)
account_id = fields.Char('Account ID', readonly=True)
profile_image_url = fields.Binary(attachment=True)
def action_fetch(self):
url = 'https://graph.facebook.com/v15.0/me/accounts?access_token=%s' % self.access_token
page = requests.get(url)
page_content = page.json()
if not page_content.get('error'):
if page_content['data'][0]['id']:
url = 'https://graph.facebook.com/v14.0/%s?fields=instagram_business_account&access_token=%s' % (
page_content['data'][0]['id'], self.access_token)
business_account = requests.get(url)
instagram_business_account = business_account.json()['instagram_business_account']['id']
url = 'https://graph.facebook.com/v15.0/%s?fields=name,username,biography,website,followers_count,follows_count,media_count,profile_picture_url&access_token=%s' % (
instagram_business_account, self.access_token)
val = requests.get(url)
content = val.json()
if content.get('name'):
self.name = content['name']
if content.get('username'):
self.username = content['username']
if content.get('id'):
self.account_id = content['id']
if content.get('profile_picture_url'):
img = base64.b64encode(requests.get(content['profile_picture_url']).content)
self.profile_image_url = img
else:
raise UserError(_('%s', page_content['error']['message']))
def action_get_post(self):
url = 'https://graph.facebook.com/v15.0/%s/media?access_token=%s' % (self.account_id, self.access_token)
content = requests.get(url, timeout=5).json()
if not content.get('error'):
post_list = []
records = self.env['insta.post'].search([])
for post in records:
post_list.append(post.name)
if content.get('data'):
for vals in content['data']:
if vals['id'] not in post_list:
url = 'https://graph.facebook.com/v14.0/%s?fields=id,caption,comments_count,is_comment_enabled,like_count,media_product_type,media_type,media_url,owner,permalink,thumbnail_url,timestamp,username&access_token=%s' % (
vals['id'], self.access_token)
media_content = requests.get(url, timeout=5).json()
if media_content.get('media_type'):
if media_content['media_type'] == 'IMAGE':
res = self.env['insta.post'].create({
'name': media_content['id'],
'profile_id':self.id,
})
image_data = base64.b64encode(requests.get(media_content['media_url']).content)
res.write({
'post_image': image_data,
})
if media_content.get('caption'):
res.write({
'caption': media_content['caption'],
})
else:
record = self.env['insta.post'].search([('name', '=', vals['id'])])
record.action_update_post(self.access_token)
else:
raise UserError(_('%s', content['error']['message']))

4
insta_feed_snippet/security/ir.model.access.csv

@ -0,0 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
insta_profile_id,insta.profile.name,model_insta_profile,,1,1,1,1
insta_post_id,insta.post.name,model_insta_post,,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 insta_profile_id insta.profile.name model_insta_profile 1 1 1 1
3 insta_post_id insta.post.name model_insta_post 1 1 1 1

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Loading…
Cancel
Save