Browse Source

Dec 11 : [ADD] Initial Commit 'all_in_one_dynamic_custom_fields'

pull/298/merge
AjmalCybro 1 year ago
parent
commit
da669b372f
  1. 48
      all_in_one_dynamic_custom_fields/README.rst
  2. 23
      all_in_one_dynamic_custom_fields/__init__.py
  3. 46
      all_in_one_dynamic_custom_fields/__manifest__.py
  4. 36
      all_in_one_dynamic_custom_fields/data/dynamic_field_widgets_data.xml
  5. 6
      all_in_one_dynamic_custom_fields/doc/RELEASE_NOTES.md
  6. 25
      all_in_one_dynamic_custom_fields/models/__init__.py
  7. 37
      all_in_one_dynamic_custom_fields/models/dynamic_field_widgets.py
  8. 264
      all_in_one_dynamic_custom_fields/models/dynamic_fields.py
  9. 32
      all_in_one_dynamic_custom_fields/models/ir_model_fields.py
  10. 27
      all_in_one_dynamic_custom_fields/security/all_in_one_dynamic_custom_fields_groups.xml
  11. 4
      all_in_one_dynamic_custom_fields/security/ir.model.access.csv
  12. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/check.png
  13. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/chevron.png
  14. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/cogs.png
  15. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/consultation.png
  16. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/ecom-black.png
  17. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/education-black.png
  18. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/hotel-black.png
  19. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/license.png
  20. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/lifebuoy.png
  21. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/manufacturing-black.png
  22. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/pos-black.png
  23. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/puzzle.png
  24. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/restaurant-black.png
  25. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/service-black.png
  26. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/trading-black.png
  27. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/training.png
  28. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/update.png
  29. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/user.png
  30. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/icons/wrench.png
  31. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/misc/categories.png
  32. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/misc/check-box.png
  33. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/misc/compass.png
  34. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/misc/corporate.png
  35. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/misc/customer-support.png
  36. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/misc/cybrosys-logo.png
  37. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/misc/features.png
  38. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/misc/logo.png
  39. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/misc/pictures.png
  40. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/misc/pie-chart.png
  41. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/misc/right-arrow.png
  42. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/misc/star.png
  43. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/misc/support.png
  44. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/misc/whatsapp.png
  45. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/modules/custom_list.png
  46. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/modules/hide_menu.png
  47. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/modules/list_view_image.png
  48. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/modules/login_qr.png
  49. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/modules/to_do_list.png
  50. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/modules/user_log.png
  51. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/screenshots/1.png
  52. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/screenshots/10.png
  53. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/screenshots/11.png
  54. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/screenshots/2.png
  55. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/screenshots/3.png
  56. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/screenshots/4.png
  57. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/screenshots/5.png
  58. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/screenshots/6.png
  59. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/screenshots/7.png
  60. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/screenshots/8.png
  61. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/screenshots/9.png
  62. BIN
      all_in_one_dynamic_custom_fields/static/description/assets/screenshots/hero.gif
  63. BIN
      all_in_one_dynamic_custom_fields/static/description/banner.png
  64. BIN
      all_in_one_dynamic_custom_fields/static/description/icon.png
  65. 662
      all_in_one_dynamic_custom_fields/static/description/index.html
  66. 124
      all_in_one_dynamic_custom_fields/views/dynamic_fields_views.xml

48
all_in_one_dynamic_custom_fields/README.rst

@ -0,0 +1,48 @@
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
All In One Dynamic Fields
=========================
*This module is used to add dynamic field to form and tree view of any model as per requirement
Configuration
=============
* Add users to the two user groups
- User: can see dynamic field created by administrator
- Administrator: can create new dynamic field
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
License
-------
Affero General Public License v3.0 (AGPL v3)
(https://www.gnu.org/licenses/agpl-3.0-standalone.html)
Credits
-------
* Developer: (V14) Ruksana P, Contact: odoo@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
==========
.. 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
all_in_one_dynamic_custom_fields/__init__.py

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

46
all_in_one_dynamic_custom_fields/__manifest__.py

@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Ruksana P (<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': 'All In One Dynamic Fields',
'version': '14.0.1.0.0',
'category': 'Extra Tools',
'summary': 'Create Custom Fields As Per Your Need Without Any Coding.',
'description': """This module is used to add dynamic field of any type to
form and tree view of any model as per requirement.""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'depends': ['base'],
'data': [
'security/all_in_one_dynamic_custom_fields_groups.xml',
'security/ir.model.access.csv',
'data/dynamic_field_widgets_data.xml',
'views/dynamic_fields_views.xml',
],
'images': ['static/description/banner.png'],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': True,
}

36
all_in_one_dynamic_custom_fields/data/dynamic_field_widgets_data.xml

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<!-- Adding the data file for widget dynamic field widgets model -->
<record id="dynamic_field_widgets_image" model="dynamic.field.widgets">
<field name="name">image</field>
<field name="description">Image</field>
</record>
<record id="dynamic_field_widgets_many2many_tags"
model="dynamic.field.widgets">
<field name="name">many2many_tags</field>
<field name="description">Many2many Tags</field>
</record>
<record id="dynamic_field_widgets_binary" model="dynamic.field.widgets">
<field name="name">binary</field>
<field name="description">Binary</field>
</record>
<record id="dynamic_field_widgets_radio" model="dynamic.field.widgets">
<field name="name">radio</field>
<field name="description">Radio</field>
</record>
<record id="dynamic_field_widgets_priority"
model="dynamic.field.widgets">
<field name="name">priority</field>
<field name="description">Priority</field>
</record>
<record id="dynamic_field_widgets_monetary"
model="dynamic.field.widgets">
<field name="name">monetary</field>
<field name="description">Monetary</field>
</record>
<record id="dynamic_field_widgets_selection"
model="dynamic.field.widgets">
<field name="name">selection</field>
<field name="description">Selection</field>
</record>
</odoo>

6
all_in_one_dynamic_custom_fields/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <all_in_one_dynamic_custom_fields>
#### 07.12.2023
#### Version 14.0.1.0.0
##### ADD
- Initial commit for All In One Dynamic Fields

25
all_in_one_dynamic_custom_fields/models/__init__.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Ruksana P (<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/>.
#
###############################################################################
from . import dynamic_fields
from . import dynamic_field_widgets
from . import ir_model_fields

37
all_in_one_dynamic_custom_fields/models/dynamic_field_widgets.py

@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Ruksana P (<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/>.
#
###############################################################################
from odoo import models, fields
class DynamicFieldWidgets(models.Model):
""" We can't filter a selection field dynamically so when we select a field
its widgets also need to change according to the selected field type,
we can't do it by a 'selection' field, need a 'Many2one' field.
"""
_name = 'dynamic.field.widgets'
_rec_name = 'description'
_description = 'Field Widgets'
name = fields.Char(string="Name", help="Enter the name")
description = fields.Char(string="Description",
help="Enter the description of field")

264
all_in_one_dynamic_custom_fields/models/dynamic_fields.py

@ -0,0 +1,264 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Ruksana P (<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/>.
#
###############################################################################
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
class DynamicFields(models.Model):
_name = 'dynamic.fields'
_rec_name = 'field_description'
_description = 'Custom Dynamic Fields'
_inherit = 'ir.model.fields'
@api.model
def get_possible_field_types(self):
"""Return all available field types other than 'One2many' and
'reference' fields."""
field_list = sorted((key, key) for key in fields.MetaField.by_type)
field_list.remove(('one2many', 'one2many'))
field_list.remove(('reference', 'reference'))
return field_list
dynamic_field_id = fields.Many2one('ir.model.fields', string='Field Name',
required=True, ondelete='cascade',
help='Please Enter the name of field')
position = fields.Selection([('before', 'Before'), ('after', 'After')],
string='Position', required=True,
help='Select the position of dynamic field '
'relative to reference field')
model_id = fields.Many2one('ir.model', string='Model', required=True,
index=True, ondelete='cascade',
help="Mention the model name for this field "
"to be added")
ref_model_id = fields.Many2one('ir.model', string='Reference Model',
help='Choose the model id for which we want '
'to add field', index=True, )
selection_field = fields.Char(string="Selection Options",
help='Enter the selection options')
field_type = fields.Selection(selection='get_possible_field_types',
string='Field Type', required=True,
help='Select the field type here')
ttype = fields.Selection(string="Field Type", related='field_type',
help='Select the field type here')
widget_id = fields.Many2one('dynamic.field.widgets', string='Widget',
help='Choose the field widget')
groups = fields.Many2many('res.groups', 'employee_dynamic_fields_group_rel',
'field_id', 'group_id', string='Group',
help='Enter the group for which this field is'
' visible')
is_extra_features = fields.Boolean(string="Show Extra Properties",
help='Please enable this field for extra'
' attributes')
status = fields.Selection([('draft', 'Draft'), ('form', 'Field Created'),
('tree', 'Added in Tree View')], string='Status',
index=True, readonly=True, tracking=True,
copy=False, default='draft',
help='The status of dynamic field creation')
form_view_id = fields.Many2one('ir.ui.view', string="Form View ID",
required=True, help='Enter the form view id')
form_view_inherit = fields.Char(string="Form View Inherit Id",
related='form_view_id.xml_id',
help='Enter the inherited form view id')
custom_form_view_id = fields.Many2one('ir.ui.view', string="Form View ID",
help='Enter the custom form view id')
is_field_in_tree = fields.Boolean(string="Add Field to the Tree View",
help='Enable for tree view')
tree_view_id = fields.Many2one('ir.ui.view', string="Tree View ID",
help='Enter the tree view id', )
tree_view_inherit = fields.Char(string="Tree View Inherit Id",
related='tree_view_id.xml_id',
help='Enter the inherited tree view id')
custom_tree_view_id = fields.Many2one('ir.ui.view', string="Tree View ID",
help='Enter the custom tree view id')
@api.onchange('model_id')
def _onchange_model_id(self):
"""Return the corresponding form, tree view id and field records"""
form_view_ids = self.model_id.view_ids.filtered(
lambda l: l.type == 'form' and l.mode == 'primary')
tree_view_ids = self.model_id.view_ids.filtered(
lambda l: l.type == 'tree' and l.mode == 'primary')
field_records = self.env['ir.model.fields'].sudo().search([
('model', '=', self.model_id.model)])
field_list = [field.id for rec in field_records for field in rec]
return {'domain': {
'form_view_id': [('id', 'in', form_view_ids.ids)],
'tree_view_id': [('id', 'in', tree_view_ids.ids)],
'dynamic_field_id': [('id', 'in', field_list)]
}}
@api.onchange('field_type')
def _onchange_field_type(self):
"""When changing field type, this method returns widget of
corresponding field type"""
widget_mapping = {
'binary': [('name', '=', 'image')],
'many2many': [('name', 'in', ['many2many_tags', 'binary'])],
'selection': [('name', 'in', ['radio', 'priority'])],
'float': [('name', '=', 'monetary')],
'many2one': [('name', '=', 'selection')],
}
return {'domain': {'widget': widget_mapping.get(self.field_type,
[('id', '=', False)])}}
def action_create_dynamic_fields(self):
""" The 'CREATE FIELD' button method is used to add new field to form
view of required model"""
self.write({'status': 'form'})
if self.field_type == 'monetary' and not self.env[
'ir.model.fields'].sudo().search([('model', '=', self.model_id.id),
('name', '=', 'currency_id')]):
self.env['ir.model.fields'].sudo().create({
'name': 'x_currency_id',
'field_description': 'Currency',
'model_id': self.model_id.id,
'ttype': 'many2one',
'relation': 'res.currency',
'is_dynamic_field': True
})
self.env['ir.model.fields'].sudo().create({
'name': self.name,
'field_description': self.field_description,
'model_id': self.model_id.id,
'ttype': self.field_type,
'relation': self.ref_model_id.model,
'required': self.required,
'index': self.index,
'store': self.store,
'help': self.help,
'readonly': self.readonly,
'selection': self.selection_field,
'copied': self.copied,
'is_dynamic_field': True
})
inherit_form_view_name = str(
self.form_view_id.name) + ".inherit.dynamic.custom." + str(
self.field_description) + ".field"
xml_id = self.form_view_id.xml_id
inherit_id = self.env.ref(xml_id)
arch_base = _('<?xml version="1.0"?>'
'<data>'
'<field name="%s" position="%s">'
'<field name="%s"/>'
'</field>'
'</data>') % (self.dynamic_field_id.name,
self.position, self.name)
if self.widget_id:
arch_base = _('<?xml version="1.0"?>'
'<data>'
'<field name="%s" position="%s">'
'<field name="%s" widget="%s"/>'
'</field>'
'</data>') % (self.dynamic_field_id.name,
self.position, self.name,
self.widget_id.name)
self.custom_form_view_id = self.env['ir.ui.view'].sudo().create({
'name': inherit_form_view_name,
'type': 'form',
'model': self.model_id.model,
'mode': 'extension',
'inherit_id': inherit_id.id,
'arch_base': arch_base,
'active': True
})
return {
'type': 'ir.actions.client',
'tag': 'reload',
}
def action_add_field_to_tree_view(self):
""" Button 'Add to Tree View' is used add the created dynamic field to
tree view of corresponding model"""
tree_view = self.env['ir.ui.view'].search(
[('model', '=', self.model_id.model), ('type', '=', 'tree')])
view_id_tree = self.env.ref(self.tree_view_inherit)
if tree_view and view_id_tree.arch:
if self.is_field_in_tree:
inherit_tree_view_name = str(
self.tree_view_id.name) + ".inherit.dynamic.custom" + \
str(self.field_description) + ".field"
tree_view_arch_base = _(
'<?xml version="1.0"?>'
'<data>'
'''<xpath expr="//tree" position="inside">'''
'''<field name="%s" optional="show"/>'''
'''</xpath>'''
'''</data>''') % self.name
self.custom_tree_view_id = self.env['ir.ui.view'].sudo().create(
{'name': inherit_tree_view_name,
'type': 'tree',
'model': self.model_id.model,
'mode': 'extension',
'inherit_id': self.tree_view_id.id,
'arch_base': tree_view_arch_base,
'active': True})
self.write({'status': 'tree'})
return {
'type': 'ir.actions.client',
'tag': 'reload',
}
else:
raise ValidationError(
_('Error! Selected Model You cannot add a custom field to the '
'tree view.'))
@api.depends('model_id')
@api.onchange('model_id')
def onchange_domain(self):
"""Return the fields that currently present in the form"""
form_view_ids = self.model_id.view_ids.filtered(
lambda l: l.type == 'form' and l.mode == 'primary')
tree_view_ids = self.model_id.view_ids.filtered(
lambda l: l.type == 'tree' and l.mode == 'primary')
field_records = self.env['ir.model.fields'].sudo().search([
('model', '=', self.model_id.model)])
field_list = [field.id for record in field_records for field in record]
return {'domain': {
'form_view_id': [('id', 'in', form_view_ids.ids)],
'tree_view_id': [('id', 'in', tree_view_ids.ids)],
'position_field': [('id', 'in', field_list)]
}}
@api.depends('field_type')
@api.onchange('field_type')
def onchange_field_type(self):
""""Onchange method of field_type, when changing field type it will
return domain for widget """
widget_mappings = {
'binary': [('name', '=', 'image')],
'many2many': [('name', 'in', ['many2many_tags', 'binary'])],
'selection': [('name', 'in', ['radio', 'priority'])],
'float': [('name', '=', 'monetary')],
'many2one': [('name', '=', 'selection')],
}
return {'domain': {'widget': widget_mappings.get(self.field_type,
[('id', '=', False)])}}
def unlink(self):
""" Unlinking method of dynamic field"""
if self.form_view_id:
self.form_view_id.active = False
if self.tree_view_id:
self.tree_view_id.active = False
result = super().unlink()
return result

32
all_in_one_dynamic_custom_fields/models/ir_model_fields.py

@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Ruksana P (<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/>.
#
###############################################################################
from odoo import models, fields
class IrModelFields(models.Model):
"""Adding a new field to understand the dynamically created fields."""
_inherit = 'ir.model.fields'
is_dynamic_field = fields.Boolean(string="Dynamic Field",
help='Enable this field for dynamic field'
'creation')

27
all_in_one_dynamic_custom_fields/security/all_in_one_dynamic_custom_fields_groups.xml

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Added two user groups for dynamic custom field creation -->
<odoo>
<record id="module_dynamic_fields" model="ir.module.category">
<field name="name">All in One Custom Dynamic Fields</field>
<field name="description">Helps you handle your All-in-One Custom
Dynamic Fields Permissions
</field>
<field name="sequence">5</field>
</record>
<record id="all_in_one_dynamic_custom_fields_group_user"
model="res.groups">
<field name="name">User</field>
<field name="category_id"
ref="all_in_one_dynamic_custom_fields.module_dynamic_fields"/>
</record>
<record id="all_in_one_dynamic_custom_fields_group_administrator"
model="res.groups">
<field name="name">Administrator</field>
<field name="category_id"
ref="all_in_one_dynamic_custom_fields.module_dynamic_fields"/>
<field name="implied_ids"
eval="[(4, ref('all_in_one_dynamic_custom_fields.all_in_one_dynamic_custom_fields_group_user'))]"/>
<field name="users"
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>
</odoo>

4
all_in_one_dynamic_custom_fields/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
access_all_in_one_dynamic_custom_fields_administrator,dynamic.fields.administrator,model_dynamic_fields,all_in_one_dynamic_custom_fields.all_in_one_dynamic_custom_fields_group_administrator,1,1,1,1
access_all_in_one_dynamic_custom_fields_user,dynamic.fields.user,model_dynamic_fields,all_in_one_dynamic_custom_fields.all_in_one_dynamic_custom_fields_group_user,1,0,0,0
access_dynamic_field_widgets_administrator,dynamic.field.widgets.administrator,model_dynamic_field_widgets,all_in_one_dynamic_custom_fields.all_in_one_dynamic_custom_fields_group_administrator,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_all_in_one_dynamic_custom_fields_administrator dynamic.fields.administrator model_dynamic_fields all_in_one_dynamic_custom_fields.all_in_one_dynamic_custom_fields_group_administrator 1 1 1 1
3 access_all_in_one_dynamic_custom_fields_user dynamic.fields.user model_dynamic_fields all_in_one_dynamic_custom_fields.all_in_one_dynamic_custom_fields_group_user 1 0 0 0
4 access_dynamic_field_widgets_administrator dynamic.field.widgets.administrator model_dynamic_field_widgets all_in_one_dynamic_custom_fields.all_in_one_dynamic_custom_fields_group_administrator 1 1 1 1

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/modules/custom_list.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/modules/hide_menu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/modules/list_view_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/modules/login_qr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/modules/to_do_list.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/modules/user_log.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/screenshots/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/screenshots/10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/screenshots/11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/screenshots/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/screenshots/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/screenshots/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/screenshots/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/screenshots/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/screenshots/7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/screenshots/8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/assets/screenshots/9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
all_in_one_dynamic_custom_fields/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

662
all_in_one_dynamic_custom_fields/static/description/index.html

@ -0,0 +1,662 @@
<div style="background-color: #714B67; height: 810px; width: 100%; padding: 15px; position: relative;">
<!-- TITLE BAR -->
<div class="d-flex align-items-center justify-content-between"
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 -->
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<!-- APP HERO -->
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">
All In One Dynamic Fields</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">
Create Custom Fields In Any Module Without Any Coding.</p>
<!-- END OF APP HERO -->
<img src="assets/screenshots/hero.gif" class="img-responsive"
style="width: 100%; margin-left: auto; margin-right: auto;"/>
</div>
</div>
</div>
</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">
All in One Custom Dynamic Fields module helps with easy creation of
custom fields in as per you need without any coding.
This module helps to add new fields on the form view and tree view as
per requirement.
</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">
<div class="d-flex align-items-center"
style="margin-top: 40px; margin-bottom: 40px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Creates custom fields in any modules without coding.</span>
</div>
<div class="d-flex align-items-center"
style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">The position of the fields can be easily set.</span>
</div>
<div class="d-flex align-items-center"
style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Widgets can be selected for custom fields.</span>
</div>
<div class="d-flex align-items-center"
style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> Can set the field properties (help,required,copied,read-only,indexed)</span>
</div>
</div>
<div class="col-sm-12 col-md-6">
</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;">
Create Custom Dynamic Fields
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
After installation, give the user access to 'All in One Custom
Dynamic Fields' from user settings.</p>
<img src="assets/screenshots/1.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;">
Create Fields
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Open the module and Click CREATE button to create new custom
fields and fill the details.Then click the CREATE FIELD.</p>
<img src="assets/screenshots/2.png" class="img-thumbnail">
<img src="assets/screenshots/3.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;">
Model
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Select the Model for which you want to create a custom
field.</p>
<img src="assets/screenshots/4.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;">
Field Type
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Choose the Field Type</p>
<img src="assets/screenshots/5.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;">
List / Tree View
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
The custom field also we can add to the module List/Tree view.
</p>
<img src="assets/screenshots/6.png" class="img-thumbnail">
<img src="assets/screenshots/7.png" class="img-thumbnail">
<img src="assets/screenshots/8.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;">
Sale Order Form View
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
A new custom field is created in the sale order form view.</p>
<img src="assets/screenshots/9.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;">
Sale Order Tree/List View
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
A new custom field is created in the sale order tree view.</p>
<img src="assets/screenshots/10.png" class="img-thumbnail">
<img src="assets/screenshots/11.png" class="img-thumbnail">
</div>
</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-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="color: #212529 !important;">Suggested Products</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/>
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/todo_list/"
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/to_do_list.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/hide_menu_user/"
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/hide_menu.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/login_user_detail/"
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/user_log.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/custom_list_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/custom_list.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/list_view_sticky_header/"
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/list_view_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/login_using_qr/"
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/login_qr.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 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 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 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 d-flex justify-content-center align-items-center"
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 d-flex justify-content-center align-items-center"
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 -->

124
all_in_one_dynamic_custom_fields/views/dynamic_fields_views.xml

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Menus, form , tree view for model dynamic fields-->
<odoo>
<record id="dynamic_fields_view_tree" model="ir.ui.view">
<field name="name">dynamic.fields.view.tree</field>
<field name="model">dynamic.fields</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="field_description"/>
<field name="model_id"/>
<field name="status"/>
</tree>
</field>
</record>
<record id='dynamic_fields_view_form' model='ir.ui.view'>
<field name="name">dynamic.fields.view.form</field>
<field name="model">dynamic.fields</field>
<field name="arch" type="xml">
<form>
<header>
<button name="action_create_dynamic_fields"
string="Create Field"
type="object" class="oe_highlight"
attrs="{'invisible': [('status', 'in', ['form','tree'])]}"
groups="all_in_one_dynamic_custom_fields.all_in_one_dynamic_custom_fields_group_administrator"/>
<button name="action_add_field_to_tree_view"
string="Add to Tree View" type="object"
class="oe_highlight"
attrs="{'invisible': ['|',('is_field_in_tree', '=', False),('status','=','tree')]}"
groups="all_in_one_dynamic_custom_fields.all_in_one_dynamic_custom_fields_group_administrator"/>
<field name="status" widget="statusbar"
statusbar_visible="draft,form,tree"/>
</header>
<sheet>
<group>
<group string="Field Info">
<field name="name"/>
<field name="field_description"/>
<field name="state" readonly="1"
groups="base.group_no_one"/>
<field name="model_id"
options='{"no_open": True, "no_create": True}'/>
<field name="field_type"/>
<field name="selection_field"
placeholder="[('blue', 'Blue'),('yellow', 'Yellow')]"
attrs="{'required': [('field_type','in',['selection','reference'])],
'readonly': [('field_type','not in',['selection','reference'])],
'invisible': [('field_type','not in',['selection','reference'])]}"/>
<field name="ref_model_id"
options='{"no_open": True, "no_create": True}'
attrs="{'required': [('field_type','in',['many2one','many2many'])],
'readonly': [('field_type','not in',['many2one','many2many'])],
'invisible': [('field_type','not in',['many2one','many2many'])]}"/>
<field name="widget_id" widget="selection"
attrs="{'invisible': [('field_type','not in',['binary', 'many2many', 'selection', 'float', 'many2one'])]}"/>
<field name="required"/>
<field name="form_view_id"
attrs="{'invisible': [('status', 'in', ['form','tree'])]}"/>
<field name="custom_form_view_id"
attrs="{'invisible': [('status', '=', 'draft')]}"/>
<field name="form_view_inherit"/>
</group>
<group string="Tree View"
attrs="{'invisible': [('status', '=', 'draft')]}">
<field name="is_field_in_tree"/>
<field name="tree_view_id" attrs="{'invisible': ['|',('is_field_in_tree', '=', False) ,('status','in',['tree','draft'])],
'required': [('is_field_in_tree', '=', True)]}"/>
<field name="custom_tree_view_id" attrs="{'invisible': [('status','in',['form','draft'])],
'required': [('status', '=', 'tree')]}"/>
<field name="tree_view_inherit"
attrs="{'invisible': [('is_field_in_tree', '=', False)]}"/>
</group>
<group string="Position">
<field name="dynamic_field_id"
options='{"no_open": True, "no_create": True}'/>
<field name="position"/>
</group>
</group>
<group string="Extra Properties">
<group>
<field name="is_extra_features"/>
</group>
<group attrs="{'invisible': [('is_extra_features', '=', False)]}">
<field name="help"/>
</group>
<group attrs="{'invisible': [('is_extra_features', '=', False)]}">
<field name="readonly"/>
<field name="store"/>
<field name="index"/>
<field name="copied"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id='dynamic_fields_action' model='ir.actions.act_window'>
<field name="name">Custom Dynamic Fields</field>
<field name="res_model">dynamic.fields</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create New Custom Dynamic Field!
</p>
</field>
</record>
<menuitem id="all_in_one_dynamic_custom_fields_menu_root"
name="All in One Custom Dynamic Fields"
groups="all_in_one_dynamic_custom_fields_group_user,all_in_one_dynamic_custom_fields_group_administrator"
web_icon="all_in_one_dynamic_custom_fields,static/web_icon.png"
sequence="01"
/>
<menuitem id="dynamic_fields_menu"
name="Fields"
parent="all_in_one_dynamic_custom_fields_menu_root"
sequence="1"/>
<menuitem id="dynamic_fields_menu_create"
name="Create Fields"
parent="dynamic_fields_menu"
action="dynamic_fields_action"
groups="all_in_one_dynamic_custom_fields_group_user,all_in_one_dynamic_custom_fields_group_administrator"
sequence="2"/>
</odoo>
Loading…
Cancel
Save