Browse Source

Nov 9 [ADD] : Initial Commit

pull/221/merge
AjmalCybro 3 years ago
parent
commit
ac274a4548
  1. 43
      master_search/README.rst
  2. 22
      master_search/__init__.py
  3. 49
      master_search/__manifest__.py
  4. 7
      master_search/doc/RELEASE_NOTES.md
  5. 22
      master_search/models/__init__.py
  6. 404
      master_search/models/master_search.py
  7. 2
      master_search/security/ir.model.access.csv
  8. 20
      master_search/security/security.xml
  9. BIN
      master_search/static/description/assets/icons/check.png
  10. BIN
      master_search/static/description/assets/icons/chevron.png
  11. BIN
      master_search/static/description/assets/icons/cogs.png
  12. BIN
      master_search/static/description/assets/icons/consultation.png
  13. BIN
      master_search/static/description/assets/icons/ecom-black.png
  14. BIN
      master_search/static/description/assets/icons/education-black.png
  15. BIN
      master_search/static/description/assets/icons/hotel-black.png
  16. BIN
      master_search/static/description/assets/icons/license.png
  17. BIN
      master_search/static/description/assets/icons/lifebuoy.png
  18. BIN
      master_search/static/description/assets/icons/manufacturing-black.png
  19. BIN
      master_search/static/description/assets/icons/pos-black.png
  20. BIN
      master_search/static/description/assets/icons/puzzle.png
  21. BIN
      master_search/static/description/assets/icons/restaurant-black.png
  22. BIN
      master_search/static/description/assets/icons/service-black.png
  23. BIN
      master_search/static/description/assets/icons/trading-black.png
  24. BIN
      master_search/static/description/assets/icons/training.png
  25. BIN
      master_search/static/description/assets/icons/update.png
  26. BIN
      master_search/static/description/assets/icons/user.png
  27. BIN
      master_search/static/description/assets/icons/wrench.png
  28. BIN
      master_search/static/description/assets/misc/categories.png
  29. BIN
      master_search/static/description/assets/misc/check-box.png
  30. BIN
      master_search/static/description/assets/misc/compass.png
  31. BIN
      master_search/static/description/assets/misc/corporate.png
  32. BIN
      master_search/static/description/assets/misc/customer-support.png
  33. BIN
      master_search/static/description/assets/misc/cybrosys-logo.png
  34. BIN
      master_search/static/description/assets/misc/features.png
  35. BIN
      master_search/static/description/assets/misc/logo.png
  36. BIN
      master_search/static/description/assets/misc/pictures.png
  37. BIN
      master_search/static/description/assets/misc/pie-chart.png
  38. BIN
      master_search/static/description/assets/misc/right-arrow.png
  39. BIN
      master_search/static/description/assets/misc/star.png
  40. BIN
      master_search/static/description/assets/misc/support.png
  41. BIN
      master_search/static/description/assets/misc/whatsapp.png
  42. BIN
      master_search/static/description/assets/modules/1.png
  43. BIN
      master_search/static/description/assets/modules/2.png
  44. BIN
      master_search/static/description/assets/modules/3.png
  45. BIN
      master_search/static/description/assets/modules/4.png
  46. BIN
      master_search/static/description/assets/modules/5.gif
  47. BIN
      master_search/static/description/assets/modules/6.png
  48. BIN
      master_search/static/description/assets/screenshots/hero.gif
  49. BIN
      master_search/static/description/assets/screenshots/img1.png
  50. BIN
      master_search/static/description/assets/screenshots/img10.png
  51. BIN
      master_search/static/description/assets/screenshots/img2.png
  52. BIN
      master_search/static/description/assets/screenshots/img3.png
  53. BIN
      master_search/static/description/assets/screenshots/img4.png
  54. BIN
      master_search/static/description/assets/screenshots/img5.png
  55. BIN
      master_search/static/description/assets/screenshots/img6.png
  56. BIN
      master_search/static/description/assets/screenshots/img7.png
  57. BIN
      master_search/static/description/assets/screenshots/img8.png
  58. BIN
      master_search/static/description/assets/screenshots/img9.png
  59. BIN
      master_search/static/description/assets/video/master_search.mp4
  60. BIN
      master_search/static/description/assets/video/master_search.webm
  61. BIN
      master_search/static/description/banner.png
  62. BIN
      master_search/static/description/icon.png
  63. 698
      master_search/static/description/index.html
  64. 36
      master_search/static/src/scss/master_search.scss
  65. 340
      master_search/views/master_search_view.xml
  66. 41
      multiple_reference_per_product/README.md
  67. 23
      multiple_reference_per_product/__init__.py
  68. 43
      multiple_reference_per_product/__manifest__.py
  69. 10
      multiple_reference_per_product/doc/RELEASE_NOTES.md
  70. 23
      multiple_reference_per_product/models/__init__.py
  71. 144
      multiple_reference_per_product/models/multiple_reference_per_product.py
  72. 2
      multiple_reference_per_product/security/ir.model.access.csv
  73. BIN
      multiple_reference_per_product/static/description/assets/icons/check.png
  74. BIN
      multiple_reference_per_product/static/description/assets/icons/chevron.png
  75. BIN
      multiple_reference_per_product/static/description/assets/icons/cogs.png
  76. BIN
      multiple_reference_per_product/static/description/assets/icons/consultation.png
  77. BIN
      multiple_reference_per_product/static/description/assets/icons/ecom-black.png
  78. BIN
      multiple_reference_per_product/static/description/assets/icons/education-black.png
  79. BIN
      multiple_reference_per_product/static/description/assets/icons/hotel-black.png
  80. BIN
      multiple_reference_per_product/static/description/assets/icons/license.png
  81. BIN
      multiple_reference_per_product/static/description/assets/icons/lifebuoy.png
  82. BIN
      multiple_reference_per_product/static/description/assets/icons/manufacturing-black.png
  83. BIN
      multiple_reference_per_product/static/description/assets/icons/pos-black.png
  84. BIN
      multiple_reference_per_product/static/description/assets/icons/puzzle.png
  85. BIN
      multiple_reference_per_product/static/description/assets/icons/restaurant-black.png
  86. BIN
      multiple_reference_per_product/static/description/assets/icons/service-black.png
  87. BIN
      multiple_reference_per_product/static/description/assets/icons/trading-black.png
  88. BIN
      multiple_reference_per_product/static/description/assets/icons/training.png
  89. BIN
      multiple_reference_per_product/static/description/assets/icons/update.png
  90. BIN
      multiple_reference_per_product/static/description/assets/icons/user.png
  91. BIN
      multiple_reference_per_product/static/description/assets/icons/wrench.png
  92. BIN
      multiple_reference_per_product/static/description/assets/misc/categories.png
  93. BIN
      multiple_reference_per_product/static/description/assets/misc/check-box.png
  94. BIN
      multiple_reference_per_product/static/description/assets/misc/compass.png
  95. BIN
      multiple_reference_per_product/static/description/assets/misc/corporate.png
  96. BIN
      multiple_reference_per_product/static/description/assets/misc/customer-support.png
  97. BIN
      multiple_reference_per_product/static/description/assets/misc/cybrosys-logo.png
  98. BIN
      multiple_reference_per_product/static/description/assets/misc/logo.png
  99. BIN
      multiple_reference_per_product/static/description/assets/misc/pictures.png
  100. BIN
      multiple_reference_per_product/static/description/assets/misc/pie-chart.png

43
master_search/README.rst

@ -0,0 +1,43 @@
Master Search
=============
* Master Search module for Odoo 16 community editions
Installation
============
- www.odoo.com/documentation/16.0/setup/install.html
- Install our custom addon
License
-------
General Public License, Version 3 (LGPL v3).
(https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html)
Company
-------
* 'Cybrosys Techno Solutions <https://cybrosys.com/>`__
Credits
-------
* Developer:
(v14) Shahil @ Cybrosys
(v15) Athul @ Cybrosys
(v16) Rosmy @ Cybrosys
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>`__

22
master_search/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
# you can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import models

49
master_search/__manifest__.py

@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
# you can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Global Search',
'version': '16.0.1.0.0',
'summary': """Easy Search in Customers, Products, Sale, Purchase, Inventory and Accounting modules""",
'description': """Search, Global Search, Quick Search, Easy Search, Easy Search in Customers, Products, Sale, Purchase, Inventory and Accounting modules,
Search, Advance search, global search, odoo16, """,
'category': 'Settings',
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'license': 'AGPL-3',
'images': ['static/description/banner.png'],
'depends': ['base', 'stock', 'sale', 'purchase'],
'data': [
'security/ir.model.access.csv',
'security/security.xml',
'views/master_search_view.xml'
],
'assets': {
'web.assets_backend': [
'master_search/static/src/scss/master_search.scss'
],
},
'installable': True,
'auto_install': False,
'application': False,
}

7
master_search/doc/RELEASE_NOTES.md

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

22
master_search/models/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
# you can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import master_search

404
master_search/models/master_search.py

@ -0,0 +1,404 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
# you can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import fields, models, api, _
from odoo.exceptions import UserError
from psycopg2 import sql
class MasterSearch(models.Model):
_name = 'master.search'
_description = "Model for master search"
_rec_name = 'name'
_order = "create_date desc"
name = fields.Char(string="Name", default=lambda self: _('Search'))
res_customers_id = fields.Many2many('res.partner',
'res_customers_search_rel',
'res_customers_id', 'search_id',
string="Locations")
search_string = fields.Char(string="Search")
search_mode = fields.Selection(
[('all', 'All'), ('active', 'Active'), ('inactive', 'Inactive')],
string="Search Mode", default="active")
search_by = fields.Selection(
[('any', 'Any'), ('customer', 'Customer'), ('product', 'Product'),
('sale details', 'Sale'),
('purchase details', 'Purchase'),
('transaction details', 'Inventory'),
('account details', 'Accounting')],
string="Search By", default='any')
master_search_ids = fields.Many2many('master.search',
'master_search_self_rel', 'search_id',
'search_id1',
compute="_get_recent_searches",
limit=1)
history_count = fields.Integer(string="History Count",
compute="_get_history_count")
customer_ids = fields.Many2many('res.partner', 'master_search_company_rel',
'search_id', 'company_id')
product_ids = fields.Many2many('product.template',
'master_search_product_rel', 'search_id',
'company_id')
transaction_details = fields.Many2many('stock.picking',
'master_search_transaction_details_rel',
'search_id',
'company_id', string="Inventory")
customer_count = fields.Integer(string="Company Count",
compute="_get_operator_count")
product_count = fields.Integer(string="Product Count",
compute="_get_product_count")
transaction_count = fields.Integer(string="Transaction Count",
compute="_get_transaction_count")
sale_count = fields.Integer(string="Sale Count", compute="_get_sale_count")
purchase_count = fields.Integer(string="Sale Count",
compute="_get_purchase_count")
account_count = fields.Integer(string="Account Count",
compute="_get_account_count")
user_id = fields.Many2one('res.users', string="User",
default=lambda self: self.env.user)
match_entire = fields.Boolean(string="Match entire sentence")
sale_details = fields.Many2many('sale.order',
'master_search_sale_details_rel',
'search_id',
'company_id', string="Sale")
purchase_details = fields.Many2many('purchase.order',
'master_search_purchase_details_rel',
'search_id',
'company_id', string="Sale")
account_details = fields.Many2many('account.move',
'master_search_account_details_rel',
'search_id',
'company_id', string="Account")
@api.depends('search_string')
def _get_recent_searches(self):
""" Get recent searches """
# unlink search result with empty string
try:
current_id = self.id if isinstance(self.id, int) \
else self._origin.id
except:
current_id = False
pass
empty_search = self.env['master.search'].search(
[('search_string', 'in', ['', False]),
('id', 'not in', [current_id, False]
if current_id else [False])])
if empty_search:
empty_search.unlink()
# get search histories avoid null strings
recent_searches = self.env['master.search'].search([
('search_string', 'not in', ['', False])])
# commended for viewing last search
# self.master_search_ids = recent_searches.filtered(
# lambda x: x.id != self.id) if self.id else recent_searches
self.master_search_ids = recent_searches
def action_unlink_search(self):
""" Unlink search """
self.unlink()
action = self.env.ref('master_search.master_search_action').read()[0]
return action
@api.depends('master_search_ids')
def _get_history_count(self):
""" Get history count """
self.history_count = len(self.master_search_ids)
@api.depends('product_ids')
def _get_product_count(self):
""" Get product count """
self.product_count = len(self.product_ids)
@api.depends('customer_ids')
def _get_operator_count(self):
""" Get customer count """
self.customer_count = len(self.customer_ids)
print(self.customer_count)
@api.depends('transaction_count')
def _get_transaction_count(self):
""" Get transaction details count """
self.transaction_count = len(self.transaction_details)
@api.depends('sale_count')
def _get_sale_count(self):
""" Get sale details count """
self.sale_count = len(self.sale_details)
@api.depends('purchase_count')
def _get_purchase_count(self):
""" Get purchase details count """
self.purchase_count = len(self.purchase_details)
@api.depends('account_count')
def _get_account_count(self):
""" Get account details count """
self.account_count = len(self.account_details)
def action_clear_search(self):
""" clear search input """
self.search_string = ""
self.name = "Search"
@api.model_create_multi
def create(self, vals_list):
""" Function for unlink first result and raise error if no string """
res = super(MasterSearch, self).create(vals_list)
search_index = self.env['master.search'].search_count(
[('user_id', '=', self.env.user.id)])
# unlink old search result if count greater than 10
if search_index > 10:
last_search = self.env['master.search'].search(
[('id', '!=', res.id), ('user_id', '=', self.env.user.id)],
order="create_date asc", limit=1)
last_search.unlink() if last_search else False
return res
def action_search(self):
""" search for the string and store search data """
if self.search_string and "*" in self.search_string:
return
if not self.search_string:
raise UserError(_("Please provide a search string!"))
search_keys = self.search_string.split(" ")
# delete all the lines
self.customer_ids = self.product_ids = self.transaction_details = False
# search for entire sentence
if self.match_entire:
return self._search_query(self.search_string)
# search for all the words
for key in search_keys:
search_vals = self._search_query(key)
print('search valss', search_vals)
self.name = self.search_string
def _search_query(self, key):
""" search for the model with given key and update result """
print('help')
company_id = self.env.user.company_id.id
if self.search_mode == 'all':
active_qry = """
and obj.active in ({},{})
""".format("'FALSE'", "'TRUE'")
elif self.search_mode == 'active':
active_qry = """ and obj.active in ({})""".format("'TRUE'")
else:
active_qry = """ and obj.active in ({})""".format("'FALSE'")
# search for customers
self._search_customer(key, active_qry) \
if self.search_by in ['any', 'customer'] else False
# search for products
self._search_products(key, active_qry, company_id) \
if self.search_by in ['any', 'product'] else False
# search for inventory transactions
self._search_inventory_transactions(key, active_qry, company_id) \
if self.search_by in ['any', 'transaction details'] else False
# search for inventory transactions
self._search_sale_transactions(key, active_qry, company_id) \
if self.search_by in ['any', 'sale details'] else False
# search for purchase transactions
self._search_purchase_transactions(key, active_qry, company_id) \
if self.search_by in ['any', 'purchase details'] else False
# search for account transactions
self._search_account_transactions(key, active_qry, company_id) \
if self.search_by in ['any', 'account details'] else False
def _search_account_transactions(self, key, active_qry, company_id):
""" Search for all account transactions """
sp_query = """
SELECT
am.id from account_move am
LEFT JOIN
res_partner p on p.id = am.partner_id
WHERE
am.company_id = {op_id}
AND
(am.name ILIKE '%{key}%'
OR
p.name ILIKE '%{key}%'
OR
am.state ILIKE '%{key}%')
GROUP BY
am.id,p.name
"""
self._cr.execute(
sp_query.format(op_id=company_id, key=key, active=active_qry))
moves = self._cr.dictfetchall()
move_ids = self.env['account.move'].browse([i['id'] for i in moves])
self.account_details += move_ids
def _search_purchase_transactions(self, key, active_qry, company_id):
""" Search for all purchase transactions """
sp_query = """
SELECT
po.id from purchase_order po
LEFT JOIN
res_partner p on p.id = po.partner_id
WHERE
po.company_id = {op_id}
AND
(po.name ILIKE '%{key}%'
OR
p.name ILIKE '%{key}%'
OR
po.state ILIKE '%{key}%')
GROUP BY
po.id,p.name
"""
self._cr.execute(
sp_query.format(op_id=company_id, key=key, active=active_qry))
purchases = self._cr.dictfetchall()
purchase_ids = self.env['purchase.order'].browse(
[i['id'] for i in purchases])
self.purchase_details += purchase_ids
def _search_sale_transactions(self, key, active_qry, company_id):
""" Search for all sale transactions """
sp_query = """
SELECT
sl.id from sale_order sl
LEFT JOIN
res_partner p on p.id = sl.partner_id
LEFT JOIN
product_pricelist pl
ON
pl.id = sl.pricelist_id
LEFT JOIN
account_payment_term pt
ON
pt.id = sl.payment_term_id
WHERE
sl.company_id = {op_id}
AND
(sl.name ILIKE '%{key}%'
OR
p.name ILIKE '%{key}%'
OR
sl.state ILIKE '%{key}%'
OR
pl.name::text ILIKE '%{key}%')
GROUP BY
sl.id,p.name,pl.name,pt.name
"""
self._cr.execute(
sp_query.format(op_id=company_id, key=key, active=active_qry))
sales = self._cr.dictfetchall()
sale_ids = self.env['sale.order'].browse([i['id'] for i in sales])
self.sale_details += sale_ids
def _search_inventory_transactions(self, key, active_qry, company_id):
""" Search for all inventory transactions """
sp_query = """
SELECT
sp.id from stock_picking sp
LEFT JOIN
res_partner p on p.id = sp.partner_id
LEFT JOIN
stock_picking_type t
ON
t.id = sp.picking_type_id
WHERE
sp.company_id = {op_id}
AND
(sp.name ILIKE '%{key}%'
OR
p.name ILIKE '%{key}%'
OR
sp.state ILIKE '%{key}%'
OR
t.name::text ILIKE '%{key}%')
GROUP BY
sp.id,p.name,t.name
"""
self._cr.execute(
sp_query.format(op_id=company_id, key=key, active=active_qry))
transactions = self._cr.dictfetchall()
transaction_ids = self.env['stock.picking'].browse(
[i['id'] for i in transactions])
print(self.transaction_details)
self.transaction_details += transaction_ids
def _search_products(self, key, active_qry, company_id):
""" search for products """
pt_query = """
SELECT
pt.id
FROM
product_template pt
LEFT JOIN
product_category pc
ON
pc.id = pt.categ_id
WHERE
(pt.name::text ILIKE '%{key}%'
OR
pt.default_code ILIKE '%{key}%'
OR
pt.type ILIKE '%{key}%'
OR
pt.description::text ILIKE '%{key}%'
OR
pc.name ILIKE '%{key}%')
"""
self._cr.execute(pt_query.format(op_id=company_id, key=key,
active=active_qry).replace('obj',
'pt'))
template_ids = self._cr.dictfetchall()
product_template_ids = self.env['product.template'].browse(
[i['id'] for i in template_ids])
self.product_ids += product_template_ids
print('2',product_template_ids)
def _search_customer(self, key, active_qry):
""" search for customer """
query ="""
SELECT
r.id from res_partner r
WHERE
(r.parent_id is NULL )
AND
r.type = 'contact' {active}
AND
(r.name ILIKE '%{key}%'
OR
r.street ILIKE '%{key}%'
OR
r.street2 ILIKE '%{key}%'
OR
r.city ILIKE '%{key}%'
OR
r.zip ILIKE '%{key}%'
OR
r.email ILIKE '%{key}%')
"""
query_params = query.format(key=key, active=active_qry).replace('obj',
'r')
self._cr.execute(query_params)
customers = self._cr.dictfetchall()
customer_ids = self.env['res.partner'].browse(
[i['id'] for i in customers])
self.customer_ids += customer_ids

2
master_search/security/ir.model.access.csv

@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_master_search,master.search,model_master_search,,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_master_search master.search model_master_search 1 1 1 1

20
master_search/security/security.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Record rule for search history -->
<record model="ir.rule" id="company_search_rule">
<field name="name">Company Search Rule</field>
<field name="model_id" ref="model_master_search"/>
<field name="domain_force">[('user_id', '=', user.id)]</field>
</record>
<!-- Record rules for restrict search access -->
<record model="ir.module.category" id="module_master_search">
<field name="name">Search Rights</field>
<field name="sequence">11</field>
</record>
<record id="master_search_read" model="res.groups">
<field name="name">Global Search</field>
<field name="comment">Global Search Group</field>
</record>
</odoo>

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
master_search/static/description/assets/misc/categories.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
master_search/static/description/assets/misc/check-box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
master_search/static/description/assets/misc/compass.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
master_search/static/description/assets/misc/corporate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
master_search/static/description/assets/misc/customer-support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
master_search/static/description/assets/misc/cybrosys-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
master_search/static/description/assets/misc/features.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
master_search/static/description/assets/misc/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
master_search/static/description/assets/misc/pictures.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
master_search/static/description/assets/misc/pie-chart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
master_search/static/description/assets/misc/right-arrow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

BIN
master_search/static/description/assets/misc/star.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
master_search/static/description/assets/misc/support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
master_search/static/description/assets/misc/whatsapp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
master_search/static/description/assets/modules/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
master_search/static/description/assets/modules/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
master_search/static/description/assets/modules/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
master_search/static/description/assets/modules/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
master_search/static/description/assets/modules/5.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
master_search/static/description/assets/modules/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 KiB

BIN
master_search/static/description/assets/screenshots/img1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

BIN
master_search/static/description/assets/screenshots/img10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

BIN
master_search/static/description/assets/screenshots/img2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
master_search/static/description/assets/screenshots/img3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
master_search/static/description/assets/screenshots/img4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
master_search/static/description/assets/screenshots/img5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

BIN
master_search/static/description/assets/screenshots/img6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
master_search/static/description/assets/screenshots/img7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
master_search/static/description/assets/screenshots/img8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
master_search/static/description/assets/screenshots/img9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
master_search/static/description/assets/video/master_search.mp4

Binary file not shown.

BIN
master_search/static/description/assets/video/master_search.webm

Binary file not shown.

BIN
master_search/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
master_search/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

698
master_search/static/description/index.html

@ -0,0 +1,698 @@
<div style="background-color: #714B67; min-height: 600px; width: 100%; padding: 15px; position: relative;">
<!-- TITLE BAR -->
<div
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;">
<img src="/assets/misc/cybrosys-logo.png" width="42" height="42"
style="width: 42px; height: 42px;"/>
<div>
<div style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Community
</div>
<div style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
<div style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Odoo.sh
</div>
</div>
</div>
<!-- END OF TITLE BAR -->
<!-- APP HERO -->
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">
Global Search</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">
Easy Search in Customers, Products, Sale, Purchase, Inventory and
Accounting modules
</p>
<!-- END OF APP HERO -->
<img src="assets/screenshots/hero.gif"
style="width: 75%; height: auto; position: absolute; margin-left: auto; margin-right: auto; top: 45%; left: 12%; right: auto;"/>
</div>
<!-- NAVIGATION SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="/assets/misc/compass.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Explore This
Module</h2>
</div>
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;">
<div class="col-sm-12 col-md-6 my-3">
<a href="#overview">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span>
<span
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">Learn
more about this
module</span>
</div>
<img src="/assets/misc/right-arrow.png" width="36"
height="36"/>
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#features">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span>
<span
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View
features of this
module</span>
</div>
<img src="/assets/misc/right-arrow.png" width="36"
height="36"/>
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#screenshots">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span>
<span
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View
screenshots for this
module</span>
</div>
<img src="/assets/misc/right-arrow.png" width="36"
height="36"/>
</div>
</a>
</div>
</div>
<!-- END OF NAVIGATION SECTION -->
<!-- OVERVIEW SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="overview">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="/assets/misc/pie-chart.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Overview
</h2>
</div>
<div class="row"
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 py-4">
Global Search module enables advance and simple search in different
modules. It helps users to search the records in Customers, Products,
Sale, Purchase, Inventory and Accounting Modules for 'Global Search'
group users. Possible to search using different attributes like name,
reference, number, etc.
</div>
</div>
<!-- END OF OVERVIEW SECTION -->
<!-- FEATURES SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="features">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="/assets/misc/features.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Features
</h2>
</div>
<div class="row"
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 col-md-6">
<div class="d-flex align-items-start"
style="margin-top: 40px; margin-bottom: 40px">
<img src="/assets/misc/check-box.png" class="mr-2"/>
<div>
<span
style="display: block; font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Dynamic Search View Option</span>
</div>
</div>
<div class="d-flex align-items-start"
style="margin-top: 30px; margin-bottom: 30px">
<img src="/assets/misc/check-box.png" class="mr-2"/>
<div>
<span
style="display: block; font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Possible to search with different attributes like name, reference, number, etc.</span>
</div>
</div>
<div class="d-flex align-items-start"
style="margin-top: 30px; margin-bottom: 30px">
<img src="/assets/misc/check-box.png" class="mr-2"/>
<div>
<span
style="display: block; font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Easily Search Records in Customers, Products, Sale, Purchase, Inventory and Accounting Data</span>
</div>
</div>
</div>
</div>
<!-- END OF FEATURES SECTION -->
<!-- SCREENSHOTS SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="screenshots">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="/assets/misc/pictures.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Screenshots
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Global Search User Access</h3>
<img src="/assets/screenshots/img1.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Global Search</h3>
<img src="/assets/screenshots/img2.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Search in Customer Data</h3>
<img src="/assets/screenshots/img3.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Search in Product Data</h3>
<img src="/assets/screenshots/img4.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Product Search Record View</h3>
<img src="/assets/screenshots/img5.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Search in Sale Data</h3>
<img src="/assets/screenshots/img6.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Search in Purchase Data</h3>
<img src="/assets/screenshots/img7.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Search in Inventory Data</h3>
<img src="/assets/screenshots/img8.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Search in Accounting Data</h3>
<img src="/assets/screenshots/img9.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Account Search Record View</h3>
<img src="/assets/screenshots/img10.png" class="img-thumbnail">
</div>
</div>
</div>
<div class="row" id="video">
<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-film mr-2"></i>Video
</h2>
</div>
<div class="col-lg-12 my-2">
<video width="100%" height="600px;" controls="">
<source src="assets/video/master_search.mp4" type="video/mp4">
<source src="assets/video/master_search.webm" type="video/webm">
</video>
</div>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- RELATED PRODUCTS -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="/assets/misc/categories.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Related
Products
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner" style="padding: 30px;">
<div class="carousel-item" style="min-height: 198.656px;">
<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/dynamic_accounts_report/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="//apps.odoocdn.com/apps/assets/15.0/account_day_book/assets/modules/dynamic_accounts_report.png?3e73b0c">
</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-radius: 0px;"
src="//apps.odoocdn.com/apps/assets/15.0/account_day_book/assets/modules/custom_gantt_view.png?3e73b0c">
</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/project_custom_gantt/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="//apps.odoocdn.com/apps/assets/15.0/account_day_book/assets/modules/project_custom_gantt.png?3e73b0c">
</div>
</a>
</div>
</div>
<div class="carousel-item active"
style="min-height: 198.656px;">
<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/account_reports_xlsx/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="//apps.odoocdn.com/apps/assets/15.0/account_day_book/assets/modules/account_reports_xlsx.png?3e73b0c">
</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/base_accounting_kit/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="//apps.odoocdn.com/apps/assets/15.0/account_day_book/assets/modules/base_accounting_kit.gif?3e73b0c">
</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/hr_payroll_community/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="//apps.odoocdn.com/apps/assets/15.0/account_day_book/assets/modules/hr_payroll_community.png?3e73b0c">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="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="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 RELATED PRODUCTS -->
<!-- OUR SERVICES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="/assets/misc/star.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our Services
</h2>
</div>
<div class="container my-5">
<div class="row">
<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>
</div>
<!-- END OF END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="/assets/misc/corporate.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our
Industries
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; 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: 0px; 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: 0px; 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: 0px; 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: 0px; 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: 0px; 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: 0px; 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: 0px; 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>
</div>
<!-- END OF END OF OUR INDUSTRIES -->
<!-- SUPPORT -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="/assets/misc/customer-support.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Support
</h2>
</div>
<div class="container mt-5">
<div class="row">
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4"
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="/assets/misc/support.png" height="48" width="48"
style="width: 42px; height: 42px;"/>
</div>
<div>
<h4>Need Help?</h4>
<p style="line-height: 100%;">Got questions or need help?
Get in touch.</p>
<a href="mailto:odoo@cybrosys.com">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
odoo@cybrosys.com</p>
</a>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4"
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="/assets/misc/whatsapp.png" height="52" width="52"
style="width: 52px; height: 52px;"/>
</div>
<div>
<h4>WhatsApp</h4>
<p style="line-height: 100%;">Say hi to us on WhatsApp!</p>
<a href="https://api.whatsapp.com/send?phone=918606827707">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
+91 86068
27707</p>
</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center">
<img src="/assets/misc/logo.png" width="144" height="31"
style="width:144px; height: 31px; margin-top: 40px;"/>
</div>
</div>
</div>
<!-- END OF SUPPORT -->

36
master_search/static/src/scss/master_search.scss

@ -0,0 +1,36 @@
.oe_search_tab{
cursor: pointer;
transition: .2s;
&:hover {
background-color: #7c7bad !important;
}
}
.oe_details_tree{
display: none;
}
.oe_details_tree--show{
display: block !important;
}
.btn_master_search{
display: inline-block;
background-color:#5f5e97;
color:#fff !important;
color: #fff;margin-left: 1px;
margin-top: -1px;
}
.btn_master_search:hover{
background-color: rgb(255, 255, 255) !important;
color: rgb(61, 155, 187) !important;
}
.not-allowed{
color: #d94242;
border: 1px solid #ea9292;
border-radius: 5px;
background-color: #f9e7e7;
padding: 1px 55px;
width: 370px;
margin-bottom: 5px;
display: none;
}

340
master_search/views/master_search_view.xml

@ -0,0 +1,340 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- form view -->
<record model="ir.ui.view" id="master_search_form">
<field name="name">Search</field>
<field name="model">master.search</field>
<field name="arch" type="xml">
<form string="Search">
<style>
.o_control_panel{display: none;}
</style>
<script>
$(document).ready(function(){
$(".disable_open").unbind("click");
if ($(".oe_search_bgnd").length > 0){document.title = 'Search';}
$("#recent_searches").click(function(){
event.target.parentElement.children[1].classList.toggle('oe_details_tree--show');
});
$("#customer_search_results").click(function(){
event.target.parentElement.children[1].classList.toggle('oe_details_tree--show');
});
$("#product_search_results").click(function(){
event.target.parentElement.children[1].classList.toggle('oe_details_tree--show');
});
$("#inventory_search_results").click(function(){
event.target.parentElement.children[1].classList.toggle('oe_details_tree--show');
});
$("#sale_search_results").click(function(){
event.target.parentElement.children[1].classList.toggle('oe_details_tree--show');
});
$("#purchase_search_results").click(function(){
event.target.parentElement.children[1].classList.toggle('oe_details_tree--show');
});
$("#accounting_search_results").click(function(){
event.target.parentElement.children[1].classList.toggle('oe_details_tree--show');
});
$('.o_radio_input').on('change', function(){
let targetEl = $(this).data().value;
$('.oe_details_tree').addClass('d-none');
$('.oe_details_tree').removeClass('oe_details_tree--show');
switch(targetEl){
case 'customer':
$('.oe_search_tab').addClass('d-none');
$('#customer_search_results').addClass('d-block');
$('#customer_search_results').removeClass('d-none');
break;
case 'product':
$('.oe_search_tab').addClass('d-none');
$('#product_search_results').addClass('d-block');
$('#product_search_results').removeClass('d-none');
break;
case 'transaction details':
$('.oe_search_tab').addClass('d-none');
$('#inventory_search_results').addClass('d-block');
$('#inventory_search_results').removeClass('d-none');
break;
case 'sale details':
$('.oe_search_tab').addClass('d-none');
$('#sale_search_results').addClass('d-block');
$('#sale_search_results').removeClass('d-none');
break;
case 'purchase details':
$('.oe_search_tab').addClass('d-none');
$('#purchase_search_results').addClass('d-block');
$('#purchase_search_results').removeClass('d-none');
break;
case 'account details':
$('.oe_search_tab').addClass('d-none');
$('#accounting_search_results').addClass('d-block');
$('#accounting_search_results').removeClass('d-none');
break;
case 'any':
$('.oe_search_tab').removeClass('d-none');
break;
}
$('#recent_searches').addClass('d-block');
$('#recent_searches').removeClass('d-none');
})
});
</script>
<sheet>
<div class="row oe_search_bgnd"
style="padding: 24px 32px;background-color:#e5e4f9;border-radius: 5px;">
<div class="col-12 col-md-8 col-xl-8">
<label for="search_string" string="Search " style="display: inline-block;"
class="oe_read_only"/>
<field name="search_string" default_focus="1" class="search_input"
style="width: 80%; display: inline-block;margin-right: 0px;block-size: 32px;"
placeholder="Type here to search.."/>
<button name="action_clear_search"
type="object" title="Search" class="fa fa-times oe_edit_only btn_master_search"/>
<button name="action_search"
type="object"
title="Search"
class="fa fa-search oe_search_btn btn_master_search oe_edit_only"/>
<div class="not-allowed">Regular expressions are not allowed in search!</div>
<div>
<label for="match_entire" string="Match Phrase :" style="display: inline-block;"/>
<field name="match_entire" style="display: inline-block; margin-left: 10px;"/>
</div>
<div style="display: block;">
<label for="search_by" string="Search For :" class="oe_read_only"/>
<field name="search_by" widget="radio" options="{'horizontal': true}"/>
</div>
</div>
<div class="col-12 col-md-4 col-xl-4">
<div style="display: block;">
<label for="search_mode" string="Mode :" class="oe_read_only"/>
<field name="search_mode" widget="radio" nolabel="1"
options="{'horizontal': false}"/>
</div>
</div>
</div>
<div class="oe_result_div">
<div id="recent_searches" style="background-color: #5f5e97; color: #fff; width: 100%; padding: 5px 10px;
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
class="oe_search_tab" >
Recent Searches
<div style="float: right;">
<field name="history_count" class="oe_tab_count" readonly="1"/>
Records Found
<span class="oe_drop_down">
<i style="color: #fff !important; font-size: 16px;" title="Search" class="fa fa-caret-down"
/>
</span>
</div>
</div>
<div style="height: 200px; overflow-y: scroll;width: 100%;" class="oe_details_tree">
<field name="master_search_ids">
<tree create="0" class="disable_open">
<field name="search_string" class="re_search oe_key"/>
<field name="search_mode" string="Mode" class="re_search"/>
<field name="search_by" string="Type" class="re_search"/>
<!--<field name="create_date" string="Date" optional="hide" class="re_search"/>-->
<button style="display: inline-block;" name="action_unlink_search"
title="Search" type="object" class="fa fa-trash"/>
</tree>
</field>
</div>
</div>
<div class="oe_result_div">
<div id="customer_search_results" style="background-color: #5f5e97; color: #fff; width: 100%; padding: 5px 10px;
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
class="oe_search_tab accordion_tab">
Customer Search Results
<div style="float: right;">
<field name="customer_count" class="oe_tab_count" readonly="1"/>
Records Found
<span class="oe_drop_down">
<i style="color: #fff !important; font-size: 16px;" title="Search" class="fa fa-caret-down"
/>
</span>
</div>
</div>
<div style="height: 200px; overflow-y: scroll;width: 100%;" class="oe_details_tree">
<field name="customer_ids">
<tree create="0" delete="0">
<field name="name" string="Name"/>
<field name="email" string="Email"/>
</tree>
</field>
</div>
</div>
<div class="oe_result_div">
<div id="product_search_results" style="background-color: #5f5e97; color: #fff; width: 100%; padding: 5px 10px;
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
class="oe_search_tab accordion_tab">
Product Search Results
<div style="float: right;">
<field name="product_count" class="oe_tab_count" readonly="1"/>
Records Found
<span class="oe_drop_down">
<i style="color: #fff !important; font-size: 16px;" title="Search" class="fa fa-caret-down"/>
</span>
</div>
</div>
<div style="height: 200px; overflow-y: scroll;width: 100%;" class="oe_details_tree"
name="products">
<field name="product_ids">
<tree create="0" delete="0">
<field name="name" string="Name"/>
<field name="default_code" string="Code"/>
<field name="description" string="Description"/>
<field name="type" string="Product Type"/>
<field name="categ_id" string="Category"/>
<field name="uom_id" string="Base UoM" optional="hide"/>
<field name="qty_available" string="Stock"/>
</tree>
</field>
</div>
</div>
<div class="oe_result_div">
<div id="inventory_search_results" style="background-color: #5f5e97; color: #fff; width: 100%; padding: 5px 10px;
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
class="oe_search_tab accordion_tab">
Inventory Search Results
<div style="float: right;">
<field name="transaction_count" class="oe_tab_count" readonly="1"/>
Records Found
<span class="oe_drop_down">
<i style="color: #fff !important; font-size: 16px;" title="Search" class="fa fa-caret-down"/>
</span>
</div>
</div>
<div style="height: 200px; overflow-y: scroll;width: 100%;" class="oe_details_tree">
<field name="transaction_details">
<tree create="0" delete="0">
<field name="name" string="Trans. # "/>
<field name="date_done" string="Transaction Date"/>
<field name="picking_type_id" string="Transaction Type"/>
<field name="partner_id" string="Reference Name"/>
<field name="state" string="Transaction Status"/>
</tree>
</field>
</div>
</div>
<div class="oe_result_div">
<div id="sale_search_results" style="background-color: #5f5e97; color: #fff; width: 100%; padding: 5px 10px;
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
class="oe_search_tab accordion_tab">
Sale Search Results
<div style="float: right;">
<field name="sale_count" class="oe_tab_count" readonly="1"/>
Records Found
<span class="oe_drop_down">
<i style="color: #fff !important; font-size: 16px;" title="Search" class="fa fa-caret-down"/>
</span>
</div>
</div>
<div style="height: 200px; overflow-y: scroll;width: 100%;" class="oe_details_tree">
<field name="sale_details">
<tree create="0" delete="0">
<field name="name" string="Trans. # "/>
<field name="partner_id" string="Customer"/>
<field name="pricelist_id" string="Pricelist"/>
<field name="payment_term_id" string="Payment Term"/>
<field name="state" string="Status"/>
</tree>
</field>
</div>
</div>
<div class="oe_result_div">
<div id="purchase_search_results" style="background-color: #5f5e97; color: #fff; width: 100%; padding: 5px 10px;
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
class="oe_search_tab accordion_tab">
Purchase Search Results
<div style="float: right;">
<field name="purchase_count" class="oe_tab_count" readonly="1"/>
Records Found
<span class="oe_drop_down">
<i style="color: #fff !important; font-size: 16px;" title="Search" class="fa fa-caret-down"/>
</span>
</div>
</div>
<div style="height: 200px; overflow-y: scroll;width: 100%;" class="oe_details_tree">
<field name="purchase_details">
<tree create="0" delete="0">
<field name="name" string="Trans. # "/>
<field name="partner_id" string="Customer"/>
<field name="state" string="Status"/>
</tree>
</field>
</div>
</div>
<div class="oe_result_div">
<div id="accounting_search_results" style="background-color: #5f5e97; color: #fff; width: 100%; padding: 5px 10px;
margin-top: 10px; border-top-right-radius: 5px;border-top-left-radius: 5px;"
class="oe_search_tab accordion_tab">
Accounting Search Results
<div style="float: right;">
<field name="account_count" class="oe_tab_count" readonly="1"/>
Records Found
<span class="oe_drop_down">
<i style="color: #fff !important; font-size: 16px;" title="Search" class="fa fa-caret-down"/>
</span>
</div>
</div>
<div style="height: 200px; overflow-y: scroll;width: 100%;" class="oe_details_tree">
<field name="account_details">
<tree create="false" delete="false" edit="false">
<field name="name" string="Trans. # "/>
<field name="partner_id" string="Customer"/>
<field name="state" string="Status"/>
</tree>
</field>
</div>
</div>
</sheet>
</form>
</field>
</record>
<!-- actions opening views on models -->
<record model="ir.actions.act_window" id="master_search_action">
<field name="name">Search</field>
<field name="res_model">master.search</field>
<field name="view_mode">form</field>
<field name="context">{'active_test': False, 'search_default_filter_active': 1}</field>
</record>
<!-- Search root menu -->
<menuitem id="master_search_root" name="Search" action="master_search_action"
web_icon="master_search,static/description/icon.png"
sequence="2" groups="master_search.master_search_read"/>
</data>
</odoo>

41
multiple_reference_per_product/README.md

@ -0,0 +1,41 @@
Multiple reference per products
------------------
Supporting Addon for stock, Manages product reference code
Configuration
=============
* No additional configurations needed
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
Credits
-------
Cybrosys Technologies.
(odoo@cybrosys.com)
Contacts
--------
* Mail Contact : odoo@cybrosys.com
* Website : https://cybrosys.com
Bug Tracker
-----------
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Maintainer
==========
.. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
This module is maintained by Cybrosys Technologies.
For support and more information, please visit `Our Website <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

23
multiple_reference_per_product/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2020-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Techno Solutions(odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models

43
multiple_reference_per_product/__manifest__.py

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2020-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Techno Solutions(odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': "Multiple Reference Per Product",
'version': '16.0.1.0.0',
'summary': 'Multiple Reference Per Product',
'description': """Add multiple reference code for a product template or product variant. Easily manage between the
different codes as default code for the product.""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': "https://cybrosys.com/",
'category': 'Inventory/Inventory',
'depends': ['stock'],
'data': [
'security/ir.model.access.csv',
'views/multiple_reference_per_product.xml',
],
'images': ['static/description/banner.png'],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': True,
}

10
multiple_reference_per_product/doc/RELEASE_NOTES.md

@ -0,0 +1,10 @@
## Module <multiple_reference_per_products>
#### 10.10.2021
#### Version 16.0.1.0.0
#### ADD
Initial commit for Multiple Reference Per Product

23
multiple_reference_per_product/models/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2020-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Techno Solutions(odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import multiple_reference_per_product

144
multiple_reference_per_product/models/multiple_reference_per_product.py

@ -0,0 +1,144 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2020-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Techno Solutions(odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields, api
class MultipleReferencePerProduct(models.Model):
_name = 'multiple.reference.per.product'
_description = 'Multiple Reference Per Product'
_rec_name = 'multiple_references_name'
multiple_references_name = fields.Char('Multiple References', required=True)
product_id = fields.Many2one('product.product', string="Product", required=True)
is_default_reference = fields.Boolean(string="Is default reference", compute='_is_default_reference')
def _is_default_reference(self):
"""Check if the current code is default code for the product"""
for reference in self:
if reference.product_id:
reference.is_default_reference = True if reference.product_id.default_code == reference.multiple_references_name else False
def set_as_default(self):
"""Set the current code as default code for the product"""
self.ensure_one()
self.product_id.default_code = self.multiple_references_name
def create_reference(self, reference_code, product_id):
"""Add existing default code into the reference model"""
reference = self.create({
'multiple_references_name': reference_code,
'product_id': product_id,
})
return True if reference else False
@api.model
def create(self, values):
if values.get('multiple_references_name') and values.get('product_id'):
reference_code = self.search([('multiple_references_name', '=', values.get('multiple_references_name')), ('product_id', '=', values.get('product_id'))])
if reference_code:
res = reference_code[0]
else:
res = super(MultipleReferencePerProduct, self).create(values)
if not res.product_id.default_code:
res.product_id.default_code = res.multiple_references_name
return res
else:
res = super(MultipleReferencePerProduct, self).create(values)
return res
def write(self, values):
multiple_references_name = values.get('multiple_references_name')
multiple_references_name = [multiple_references_name] if multiple_references_name else self.mapped('name')
product_id = values.get('product_id')
product_ids = [product_id] if product_id else self.mapped('product_id').ids
reference_code = self.search([('multiple_references_name', 'in', multiple_references_name), ('product_id', 'in', product_ids)])
if reference_code:
return False
return super(MultipleReferencePerProduct, self).write(values)
class ProductProductInherit(models.Model):
_inherit = 'product.product'
multiple_references_ids = fields.One2many("multiple.reference.per.product", "product_id", string="Multiple "
"References")
multiple_references_code = fields.Char(string="Multiple References", related="multiple_references_ids"
".multiple_references_name")
multiple_references_id = fields.Many2many("multiple.reference.per.product", string="Multiple References",
compute="_get_multiple_reference")
multiple_references_count = fields.Integer(string="NUmber of references", compute="_get_multiple_reference_count")
@api.depends('multiple_references_id')
def _get_multiple_reference_count(self):
"""Get the count of reference code"""
self.multiple_references_count = len(self.multiple_references_ids)
def _get_multiple_reference(self):
self.multiple_references_id = self.multiple_references_ids.filtered(lambda references: references.multiple_references_name != self.default_code).ids
def multiple_references_list(self):
return {
'name': "Multiple References",
'type': 'ir.actions.act_window',
'target': 'current',
'res_model': 'multiple.reference.per.product',
'views': [[False, "tree"], [False, "form"]],
'context': {'default_product_id': self.id},
'domain': [('product_id', '=', self.id)],
}
def write(self, values):
if values.get('default_code'):
if self.default_code:
self.env['multiple.reference.per.product'].sudo().create_reference(self.default_code, self.id)
res = super(ProductProductInherit, self).write(values)
return res
class ProductTemplateInherit(models.Model):
_inherit = 'product.template'
multiple_references_code = fields.Char(string="Multiple References", related="product_variant_ids"
".multiple_references_ids"
".multiple_references_name")
multiple_references_id = fields.Many2many("multiple.reference.per.product", string="Multiple References",
compute="_get_multiple_reference")
multiple_references_count = fields.Integer(string="NUmber of references", compute="_get_multiple_reference_count")
@api.depends('multiple_references_id')
def _get_multiple_reference_count(self):
self.multiple_references_count = len(self.multiple_references_id)
def _get_multiple_reference(self):
self.multiple_references_id = self.product_variant_ids.mapped('multiple_references_id').filtered(lambda references: references.multiple_references_name != self.default_code).ids
def multiple_references_list(self):
return {
'name': "Multiple References",
'type': 'ir.actions.act_window',
'target': 'current',
'res_model': 'multiple.reference.per.product',
'views': [[False, "tree"], [False, "form"]],
'context': {'default_product_id': self.product_variant_id.id},
'domain': [('product_id', '=', self.product_variant_id.id)],
}

2
multiple_reference_per_product/security/ir.model.access.csv

@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_multiple_reference_per_product,multiple.reference.per.product,model_multiple_reference_per_product,,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_multiple_reference_per_product multiple.reference.per.product model_multiple_reference_per_product 1 1 1 1

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
multiple_reference_per_product/static/description/assets/misc/categories.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
multiple_reference_per_product/static/description/assets/misc/check-box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
multiple_reference_per_product/static/description/assets/misc/compass.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
multiple_reference_per_product/static/description/assets/misc/corporate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
multiple_reference_per_product/static/description/assets/misc/customer-support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
multiple_reference_per_product/static/description/assets/misc/cybrosys-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
multiple_reference_per_product/static/description/assets/misc/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
multiple_reference_per_product/static/description/assets/misc/pictures.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
multiple_reference_per_product/static/description/assets/misc/pie-chart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

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

Loading…
Cancel
Save