Browse Source

Aug 08: [FIX] Bug Fixed 'all_in_one_dynamic_custom_fields'

pull/277/head
AjmalCybro 2 years ago
parent
commit
276e52b1a8
  1. 2
      all_in_one_dynamic_custom_fields/__manifest__.py
  2. 4
      all_in_one_dynamic_custom_fields/doc/RELEASE_NOTES.md
  3. 8
      all_in_one_dynamic_custom_fields/models/dynamic_fields.py

2
all_in_one_dynamic_custom_fields/__manifest__.py

@ -22,7 +22,7 @@
################################################################################### ###################################################################################
{ {
'name': 'All in One Dynamic Fields', 'name': 'All in One Dynamic Fields',
'version': '16.0.1.1.2', 'version': '16.0.1.1.3',
'summary': 'Create Custom Fields As Per Your Need Without Any Coding.', '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', 'description': 'All in One Dynamic Fields, All in One Custom Fields, Dynamic Fields, Custom Fields, Create Fields Dynamically',
'category': 'Extra Tools', 'category': 'Extra Tools',

4
all_in_one_dynamic_custom_fields/doc/RELEASE_NOTES.md

@ -1,6 +1,6 @@
## Module <all_in_one_dynamic_custom_fields> ## Module <all_in_one_dynamic_custom_fields>
#### 02.08.2023 #### 03.08.2023
#### Version 16.0.1.1.2 #### Version 16.0.1.1.3
##### ADD ##### ADD
- Initial commit for All in One Custom Dynamic Fields - Initial commit for All in One Custom Dynamic Fields

8
all_in_one_dynamic_custom_fields/models/dynamic_fields.py

@ -126,7 +126,7 @@ class DynamicFields(models.Model):
'</data>') % (self.position_field.name, '</data>') % (self.position_field.name,
self.position, self.name, self.position, self.name,
self.widget.name) self.widget.name)
self.env['ir.ui.view'].sudo().create({ self.form_view_id = self.env['ir.ui.view'].sudo().create({
'name': inherit_form_view_name, 'name': inherit_form_view_name,
'type': 'form', 'type': 'form',
'model': self.model_id.model, 'model': self.model_id.model,
@ -153,7 +153,7 @@ class DynamicFields(models.Model):
'''<field name="%s" optional="show"/>''' '''<field name="%s" optional="show"/>'''
'''</xpath>''' '''</xpath>'''
'''</data>''') % self.name '''</data>''') % self.name
self.env['ir.ui.view'].sudo().create({ self.tree_view_id = self.env['ir.ui.view'].sudo().create({
'name': inherit_tree_view_name, 'name': inherit_tree_view_name,
'type': 'tree', 'type': 'tree',
'model': self.model_id.model, 'model': self.model_id.model,
@ -170,8 +170,8 @@ class DynamicFields(models.Model):
raise ValidationError( 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') @api.depends('model_id','add_field_in_tree')
@api.onchange('model_id') @api.onchange('model_id','add_field_in_tree')
def set_domain(self): def set_domain(self):
"""Return the fields that currently present in the form""" """Return the fields that currently present in the form"""
form_view_ids = self.model_id.view_ids.filtered( form_view_ids = self.model_id.view_ids.filtered(

Loading…
Cancel
Save