diff --git a/all_in_one_dynamic_custom_fields/README.rst b/all_in_one_dynamic_custom_fields/README.rst
index 0cf83a382..fb966df75 100644
--- a/all_in_one_dynamic_custom_fields/README.rst
+++ b/all_in_one_dynamic_custom_fields/README.rst
@@ -1,4 +1,4 @@
-.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
@@ -40,4 +40,4 @@ For support and more information, please visit `Our Website `__
\ No newline at end of file
+HTML Description: ``__
diff --git a/all_in_one_dynamic_custom_fields/__init__.py b/all_in_one_dynamic_custom_fields/__init__.py
index 42e933cbd..f122adb7d 100644
--- a/all_in_one_dynamic_custom_fields/__init__.py
+++ b/all_in_one_dynamic_custom_fields/__init__.py
@@ -1,23 +1,22 @@
# -*- coding: utf-8 -*-
-###################################################################################
+################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies ().
+# Copyright (C) 2024-TODAY Cybrosys Technologies().
# Author: Cybrosys Techno Solutions ()
#
-# 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.
+# 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 for more details.
+# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
#
-###################################################################################
+################################################################################
from . import models
diff --git a/all_in_one_dynamic_custom_fields/__manifest__.py b/all_in_one_dynamic_custom_fields/__manifest__.py
index fa45afe06..d125bac39 100644
--- a/all_in_one_dynamic_custom_fields/__manifest__.py
+++ b/all_in_one_dynamic_custom_fields/__manifest__.py
@@ -1,44 +1,46 @@
# -*- coding: utf-8 -*-
-###################################################################################
+################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies ().
+# Copyright (C) 2024-TODAY Cybrosys Technologies().
# Author: Cybrosys Techno Solutions ()
#
-# 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.
+# 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 for more details.
+# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
#
-###################################################################################
+################################################################################
{
'name': 'All in One Dynamic Fields',
- 'version': '15.0.1.1.5',
- 'summary': 'Create Custom Fields As Per Your Need Without Any Coding.',
- 'description': 'All in One Dynamic Fields, All in One Custom Fields, Dynamic Fields, Custom Fields, Create Fields Dynamically',
+ 'version': '15.0.1.2.6',
'category': 'Extra Tools',
+ 'summary': 'Create Custom Fields As Per Your Need Without Any Coding.',
+ 'description': "The features of module facilitates the addition of fields"
+ "to any view within a model, allowing users to specify"
+ "attributes and properties at their preferred "
+ "location.",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
- 'license': 'AGPL-3',
'depends': ['base'],
'data': [
'data/widget_data.xml',
'security/security.xml',
'security/ir.model.access.csv',
- 'views/dynamic_fields.xml',
+ 'views/dynamic_fields_views.xml',
],
'images': ['static/description/banner.png'],
+ 'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': False,
diff --git a/all_in_one_dynamic_custom_fields/data/widget_data.xml b/all_in_one_dynamic_custom_fields/data/widget_data.xml
index f3df52478..2544a08b4 100644
--- a/all_in_one_dynamic_custom_fields/data/widget_data.xml
+++ b/all_in_one_dynamic_custom_fields/data/widget_data.xml
@@ -2,37 +2,37 @@
-
+
image
Image
-
+
many2many_tags
Many2many Tags
-
+
binary
Binary
-
+
radio
Radio
-
+
priority
Priority
-
-
+
+
monetary
Monetary
-
+
selection
Selection
diff --git a/all_in_one_dynamic_custom_fields/doc/RELEASE_NOTES.md b/all_in_one_dynamic_custom_fields/doc/RELEASE_NOTES.md
index f7a56f7a9..d7db504d3 100644
--- a/all_in_one_dynamic_custom_fields/doc/RELEASE_NOTES.md
+++ b/all_in_one_dynamic_custom_fields/doc/RELEASE_NOTES.md
@@ -5,3 +5,7 @@
##### ADD
- Initial commit for All in One Custom Dynamic Fields
+#### 13.06.2024
+#### Version 15.0.1.2.6
+##### UPDATE
+- The latest module update includes enhancements to the list view configuration. You can now add the newly created field to the selected list view at the desired position, with the option to enable or disable its visibility by default.
diff --git a/all_in_one_dynamic_custom_fields/models/__init__.py b/all_in_one_dynamic_custom_fields/models/__init__.py
index 7cd42b061..b52af5569 100644
--- a/all_in_one_dynamic_custom_fields/models/__init__.py
+++ b/all_in_one_dynamic_custom_fields/models/__init__.py
@@ -1,25 +1,24 @@
# -*- coding: utf-8 -*-
-###################################################################################
+################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies ().
+# Copyright (C) 2024-TODAY Cybrosys Technologies().
# Author: Cybrosys Techno Solutions ()
#
-# 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.
+# 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 for more details.
+# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
#
-###################################################################################
+################################################################################
from . import ir_model_fields
-from . import field_widgets
+from . import dynamic_field_widgets
from . import dynamic_fields
diff --git a/all_in_one_dynamic_custom_fields/models/dynamic_field_widgets.py b/all_in_one_dynamic_custom_fields/models/dynamic_field_widgets.py
new file mode 100644
index 000000000..2f364c46d
--- /dev/null
+++ b/all_in_one_dynamic_custom_fields/models/dynamic_field_widgets.py
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+################################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2024-TODAY Cybrosys Technologies().
+# Author: Cybrosys Techno Solutions ()
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+################################################################################
+from odoo import models, fields
+
+
+class 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="Name given to the record")
+ description = fields.Char(string="Description",
+ help="Description of the record")
diff --git a/all_in_one_dynamic_custom_fields/models/dynamic_fields.py b/all_in_one_dynamic_custom_fields/models/dynamic_fields.py
index bc0ce3ba5..3a9de9038 100644
--- a/all_in_one_dynamic_custom_fields/models/dynamic_fields.py
+++ b/all_in_one_dynamic_custom_fields/models/dynamic_fields.py
@@ -1,30 +1,31 @@
# -*- coding: utf-8 -*-
-###################################################################################
+################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies ().
+# Copyright (C) 2024-TODAY Cybrosys Technologies().
# Author: Cybrosys Techno Solutions ()
#
-# 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.
+# 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 for more details.
+# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
#
-###################################################################################
+################################################################################
+from xlrd.xlsx import ET
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
class DynamicFields(models.Model):
+ """model to create dynamic fields to selected model"""
_name = 'dynamic.fields'
_rec_name = 'field_description'
_description = 'Custom Dynamic Fields'
@@ -39,49 +40,126 @@ class DynamicFields(models.Model):
field_list.remove(('reference', 'reference'))
return field_list
- position_field = fields.Many2one('ir.model.fields', string='Field Name',
- required=True,
- ondelete='cascade')
+ position_field_id = fields.Many2one('ir.model.fields',
+ string='Field Name',
+ help='Field name',
+ required=True,
+ ondelete='cascade')
position = fields.Selection([('before', 'Before'),
('after', 'After')], string='Position',
+ help='Position of new field to selected field',
required=True)
- model_id = fields.Many2one('ir.model', string='Model', required=True,
+ model_id = fields.Many2one('ir.model', string='Model',
+ required=True,
index=True, ondelete='cascade',
help="The model this field belongs to")
- ref_model_id = fields.Many2one('ir.model', string='Model', index=True)
- selection_field = fields.Char(string="Selection Options")
- rel_field = fields.Many2one('ir.model.fields', string='Related Field')
+ ref_model_id = fields.Many2one('ir.model', string='Model',
+ index=True, help='Reference model')
+ selection_field = fields.Char(string="Selection Options",
+ help='Selection values given to the newly '
+ 'created field')
+ rel_field_id = fields.Many2one('ir.model.fields',
+ string='Related Field', help='Related field')
field_type = fields.Selection(selection='get_possible_field_types',
- string='Field Type', required=True)
- ttype = fields.Selection(string="Field Type", related='field_type')
- widget = fields.Many2one('dynamic.field.widgets', string='Widget')
- groups = fields.Many2many('res.groups', 'employee_dynamic_fields_group_rel',
- 'field_id', 'group_id')
- extra_features = fields.Boolean(string="Show Extra Properties")
+ string='Field Type',
+ required=True, help='Field type of the '
+ 'newly created field')
+ ttype = fields.Selection(string="Field Type", related='field_type',
+ help='field type')
+ widget_id = fields.Many2one('dynamic.field.widgets',
+ string='Widget',
+ help='widget given to the newly '
+ 'creating field')
+ groups = fields.Many2many('res.groups',
+ 'employee_dynamic_fields_group_rel',
+ 'field_id', 'group_id',
+ string='Groups', help="Groups")
+ is_extra_features = fields.Boolean(string="Show Extra Properties",
+ help='Enable to give extra features to '
+ 'the newly creating field')
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',
- required=True, help='Record Status')
+ help='Record Status')
- form_view_id = fields.Many2one('ir.ui.view', string="Form View ID",
+ form_view_id = fields.Many2one('ir.ui.view',
+ string="Form View ID",
+ help='Form view id of selected model',
required=True)
form_view_inherit_id = fields.Char(string="Form View Inherit Id",
+ help='External id of selected form view',
related='form_view_id.xml_id')
- add_field_in_tree = fields.Boolean(string="Add Field to the Tree View",
- default=False)
- tree_view_id = fields.Many2one('ir.ui.view', string="Tree View ID")
+ is_add_field_in_tree = fields.Boolean(string="Add Field to the Tree View",
+ help='Enable to add field in tree '
+ 'view')
+ tree_view_id = fields.Many2one('ir.ui.view',
+ string="Tree View ID",
+ help='select a tree view id')
tree_view_inherit_id = fields.Char(string="Tree View Inherit Id",
+ help='External id of selected tree view',
related='tree_view_id.xml_id')
+ created_form_view_id = fields.Many2one('ir.ui.view',
+ help='Created from view id',
+ string='Created Form View')
+ created_tree_view_id = fields.Many2one('ir.ui.view',
+ help='Created tree view id',
+ string='Created Tree View')
+ tree_field_id = fields.Many2one('ir.model.fields',
+ sting='Tree Field',
+ domain="[('id', 'in', "
+ "tree_field_ids)]",
+ help='Tree view fields of selected tree '
+ 'view')
+ tree_field_position = fields.Selection([('before', 'Before'),
+ ('after', 'After')],
+ string='Tree Field Position',
+ help='Position of new field to '
+ 'selected field in tree view')
+ is_field_in_tree = fields.Boolean(string='Field Visible In Tree View',
+ help='Enable this to enable the toggle '
+ 'view of this field in tree view')
+ tree_field_ids = fields.Many2many('ir.model.fields',
+ string='Tree View Fields',
+ compute='_compute_tree_field_ids',
+ help='Domain field for tree view fields')
- def create_dynamic_fields(self):
+ @api.depends('tree_view_id')
+ def _compute_tree_field_ids(self):
+ """Compute function to find the tree view fields of selected tree view
+ in field tree_view_id"""
+ for rec in self:
+ if rec.tree_view_id:
+ field_list = []
+ if rec.tree_view_id.xml_id:
+ tree_fields = ET.fromstring(self.env.ref(
+ rec.tree_view_id.xml_id).arch).findall(".//field")
+ for field in tree_fields:
+ field_list.append(field.get('name'))
+ inherit_id = rec.tree_view_id.inherit_id \
+ if rec.tree_view_id.inherit_id else False
+ while inherit_id:
+ if inherit_id.xml_id:
+ tree_fields = ET.fromstring(self.env.ref(
+ inherit_id.xml_id).arch).findall(".//field")
+ for field in tree_fields:
+ field_list.append(field.get('name'))
+ inherit_id = inherit_id.inherit_id \
+ if inherit_id.inherit_id else False
+ self.tree_field_ids = self.env['ir.model.fields'].search(
+ [('model_id', '=', self.model_id.id),
+ ('name', 'in', field_list)])
+ else:
+ rec.tree_field_ids = False
+
+ def action_create_dynamic_fields(self):
+ """Function creates field with given properties to the selected 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')]):
+ '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',
@@ -115,18 +193,18 @@ class DynamicFields(models.Model):
''
''
''
- '') % (self.position_field.name,
+ '') % (self.position_field_id.name,
self.position, self.name)
- if self.widget:
+ if self.widget_id:
arch_base = _(''
''
''
''
''
- '') % (self.position_field.name,
+ '') % (self.position_field_id.name,
self.position, self.name,
- self.widget.name)
- self.form_view_id = self.env['ir.ui.view'].sudo().create({
+ self.widget_id.name)
+ self.created_form_view_id = self.env['ir.ui.view'].sudo().create({
'name': inherit_form_view_name,
'type': 'form',
'model': self.model_id.model,
@@ -140,27 +218,30 @@ class DynamicFields(models.Model):
'tag': 'reload',
}
- def add_field_to_tree_view(self):
- if self.add_field_in_tree:
- if self.add_field_in_tree:
+ def action_add_field_to_tree_view(self):
+ """Function adds created field to the tree view"""
+ if self.is_add_field_in_tree:
+ if self.is_add_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 = _(
- ''
- ''
- ''''''
- ''''''
- ''''''
- '''''') % self.name
- self.tree_view_id = self.env['ir.ui.view'].sudo().create({
+ optional = "show" if self.is_field_in_tree else "hide"
+ tree_view_arch_base = (_(f'''
+
+
+
+
+ '''))
+ self.created_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})
+ 'active': True
+ })
self.write({'status': 'tree'})
return {
'type': 'ir.actions.client',
@@ -168,52 +249,54 @@ class DynamicFields(models.Model):
}
else:
raise ValidationError(
- _('Error! Please select the boolean field Add Field to the Tree View.'))
+ _('Error! Please select the boolean field Add Field to the '
+ 'Tree View.'))
- @api.depends('model_id','add_field_in_tree')
- @api.onchange('model_id','add_field_in_tree')
+ @api.onchange('model_id', 'is_add_field_in_tree')
def set_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')
+ lambda x: x.type == 'form' and x.mode == 'primary')
tree_view_ids = self.model_id.view_ids.filtered(
- lambda l: l.type == 'tree' and l.mode == 'primary')
- fields = self.env['ir.model.fields'].sudo().search([
+ lambda x: x.type == 'tree' and x.mode == 'primary')
+ model_fields = self.env['ir.model.fields'].sudo().search([
('model', '=', self.model_id.model)])
field_list = []
- for rec in fields:
+ for rec in model_fields:
for field in rec:
field_list.append(field.id)
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)]
+ 'position_field_id': [('id', 'in', field_list)]
}}
- @api.depends('field_type')
@api.onchange('field_type')
def onchange_field_type(self):
+ """Onchange function of field_type which return domain to widget_id"""
if self.field_type:
if self.field_type == 'binary':
- return {'domain': {'widget': [('name', '=', 'image')]}}
+ return {'domain': {'widget_id': [('name', '=', 'image')]}}
elif self.field_type == 'many2many':
- return {'domain': {'widget': [
+ return {'domain': {'widget_id': [
('name', 'in', ['many2many_tags', 'binary'])]}}
elif self.field_type == 'selection':
return {'domain': {
- 'widget': [('name', 'in', ['radio', 'priority'])]}}
+ 'widget_id': [('name', 'in', ['radio', 'priority'])]}}
elif self.field_type == 'float':
- return {'domain': {'widget': [('name', '=', 'monetary')]}}
+ return {'domain': {'widget_id': [('name', '=', 'monetary')]}}
elif self.field_type == 'many2one':
- return {'domain': {'widget': [('name', '=', 'selection')]}}
+ return {'domain': {'widget_id': [('name', '=', 'selection')]}}
else:
- return {'domain': {'widget': [('id', '=', False)]}}
- return {'domain': {'widget': [('id', '=', False)]}}
+ return {'domain': {'widget_id': [('id', '=', False)]}}
+ return {'domain': {'widget_id': [('id', '=', False)]}}
def unlink(self):
- if self.form_view_id:
- self.form_view_id.active = False
- if self.tree_view_id:
- self.tree_view_id.active = False
+ """unlink function override to make the created form and tree view
+ active false"""
+ if self.created_form_view_id:
+ self.created_form_view_id.active = False
+ if self.created_tree_view_id:
+ self.created_tree_view_id.active = False
res = super(DynamicFields, self).unlink()
return res
diff --git a/all_in_one_dynamic_custom_fields/models/field_widgets.py b/all_in_one_dynamic_custom_fields/models/field_widgets.py
deleted file mode 100644
index 5e388ae11..000000000
--- a/all_in_one_dynamic_custom_fields/models/field_widgets.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# -*- coding: utf-8 -*-
-###################################################################################
-#
-# Cybrosys Technologies Pvt. Ltd.
-#
-# Copyright (C) 2022-TODAY Cybrosys Technologies ().
-# Author: Cybrosys Techno Solutions ()
-#
-# 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 .
-#
-###################################################################################
-from odoo import models, fields
-
-
-class FieldWidgets(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")
- description = fields.Char(string="Description")
diff --git a/all_in_one_dynamic_custom_fields/models/ir_model_fields.py b/all_in_one_dynamic_custom_fields/models/ir_model_fields.py
index a1655428b..83f7f9e56 100644
--- a/all_in_one_dynamic_custom_fields/models/ir_model_fields.py
+++ b/all_in_one_dynamic_custom_fields/models/ir_model_fields.py
@@ -1,25 +1,24 @@
# -*- coding: utf-8 -*-
-###################################################################################
+################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2022-TODAY Cybrosys Technologies ().
+# Copyright (C) 2024-TODAY Cybrosys Technologies().
# Author: Cybrosys Techno Solutions ()
#
-# 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.
+# 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 for more details.
+# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
#
-###################################################################################
+################################################################################
from odoo import models, fields
@@ -28,4 +27,6 @@ class IrModelFields(models.Model):
_inherit = 'ir.model.fields'
- is_dynamic_field = fields.Boolean(string="Dynamic Field")
+ is_dynamic_field = fields.Boolean(string="Dynamic Field",
+ help='weather the field is a '
+ 'dynamically created field')
diff --git a/all_in_one_dynamic_custom_fields/security/ir.model.access.csv b/all_in_one_dynamic_custom_fields/security/ir.model.access.csv
index 9c05b7930..4c1d62a38 100644
--- a/all_in_one_dynamic_custom_fields/security/ir.model.access.csv
+++ b/all_in_one_dynamic_custom_fields/security/ir.model.access.csv
@@ -1,5 +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,model_dynamic_fields,all_in_one_dynamic_custom_fields.group_all_in_one_dynamic_custom_fields_administrator,1,1,1,1
access_all_in_one_dynamic_custom_fields_user,dynamic.fields,model_dynamic_fields,all_in_one_dynamic_custom_fields.group_all_in_one_dynamic_custom_fields_user,1,0,0,0
-access_dynamic_field_widgets,"dynamic.field.widgets","model_dynamic_field_widgets",,1,1,1,1
-
+access_dynamic_field_widgets,dynamic.field.widgets,model_dynamic_field_widgets,all_in_one_dynamic_custom_fields.group_all_in_one_dynamic_custom_fields_user,1,1,1,1
diff --git a/all_in_one_dynamic_custom_fields/security/security.xml b/all_in_one_dynamic_custom_fields/security/security.xml
index 763ab2096..6acfe08b5 100644
--- a/all_in_one_dynamic_custom_fields/security/security.xml
+++ b/all_in_one_dynamic_custom_fields/security/security.xml
@@ -1,21 +1,21 @@
-
+
All in One Custom Dynamic Fields
Helps you handle your All-in-One Custom Dynamic Fields Permissions
5
-
+
User
-
+
Administrator
@@ -26,7 +26,5 @@
-
-
diff --git a/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/1.png b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/1.png
new file mode 100644
index 000000000..b0c513554
Binary files /dev/null and b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/1.png differ
diff --git a/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/10.png b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/10.png
new file mode 100644
index 000000000..ee78680e4
Binary files /dev/null and b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/10.png differ
diff --git a/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/2.png b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/2.png
new file mode 100644
index 000000000..3a8e99a8e
Binary files /dev/null and b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/2.png differ
diff --git a/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/3.png b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/3.png
new file mode 100644
index 000000000..4f5dd93dd
Binary files /dev/null and b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/3.png differ
diff --git a/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/4.png b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/4.png
new file mode 100644
index 000000000..d6d0105bd
Binary files /dev/null and b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/4.png differ
diff --git a/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/5.png b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/5.png
new file mode 100644
index 000000000..98f7ee314
Binary files /dev/null and b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/5.png differ
diff --git a/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/7.png b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/7.png
new file mode 100644
index 000000000..a91b60e5e
Binary files /dev/null and b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/7.png differ
diff --git a/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/8.png b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/8.png
new file mode 100644
index 000000000..ef4d4ac57
Binary files /dev/null and b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/8.png differ
diff --git a/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/9.png b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/9.png
new file mode 100644
index 000000000..70c386796
Binary files /dev/null and b/all_in_one_dynamic_custom_fields/static/description/assets/screenshots/9.png differ
diff --git a/all_in_one_dynamic_custom_fields/static/description/index.html b/all_in_one_dynamic_custom_fields/static/description/index.html
index aa009a803..468986ceb 100644
--- a/all_in_one_dynamic_custom_fields/static/description/index.html
+++ b/all_in_one_dynamic_custom_fields/static/description/index.html
@@ -265,9 +265,9 @@
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Select the model for which you want to create a custom field.
-
-
@@ -279,7 +279,7 @@
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Choose the field type
-
@@ -292,11 +292,11 @@
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
The custom field also we can add to the module List/Tree view.
-
-
-
@@ -309,9 +309,9 @@
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
A new custom field is created in the sale order form view.
-
-
@@ -324,9 +324,9 @@
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
A new custom field is created in the sale order tree view.
-
-
diff --git a/all_in_one_dynamic_custom_fields/views/dynamic_fields.xml b/all_in_one_dynamic_custom_fields/views/dynamic_fields.xml
deleted file mode 100644
index 289d182d5..000000000
--- a/all_in_one_dynamic_custom_fields/views/dynamic_fields.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-
- custom_dynamic_fields_view_tree
- dynamic.fields
-
-
-
-
-
-
-
-
-
-
-
- custom_dynamic_fields_view_form
- dynamic.fields
-
-
-
-
-
-
- Custom Dynamic Fields
- dynamic.fields
- tree,form
-
-
- Create New Custom Dynamic Field!
-
-
-
-
-
-
-
-
-
-
diff --git a/all_in_one_dynamic_custom_fields/views/dynamic_fields_views.xml b/all_in_one_dynamic_custom_fields/views/dynamic_fields_views.xml
new file mode 100644
index 000000000..de0875b11
--- /dev/null
+++ b/all_in_one_dynamic_custom_fields/views/dynamic_fields_views.xml
@@ -0,0 +1,117 @@
+
+
+
+
+ dynamic.fields.view.tree
+ dynamic.fields
+
+
+
+
+
+
+
+
+
+
+
+ dynamic.fields.view.form
+ dynamic.fields
+
+
+
+
+
+
+ Custom Dynamic Fields
+ dynamic.fields
+ tree,form
+
+
+ Create New Custom Dynamic Field!
+
+
+
+
+
+
+
+
+
+