diff --git a/edit_label/README.rst b/edit_label/README.rst new file mode 100644 index 000000000..c3e7254d1 --- /dev/null +++ b/edit_label/README.rst @@ -0,0 +1,38 @@ +Edit field label +================ +This module helps you to change label of a field in user interface. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: version 15: Busthana @cybrosys + version 16: Rosmy @cybrosys + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if +your issue has already been reported. + +Maintainer +========== +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ + + diff --git a/edit_label/__init__.py b/edit_label/__init__.py new file mode 100644 index 000000000..3367fdfdb --- /dev/null +++ b/edit_label/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import models diff --git a/edit_label/__manifest__.py b/edit_label/__manifest__.py new file mode 100644 index 000000000..97908e939 --- /dev/null +++ b/edit_label/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Double Click Field Label Edit', + 'version': '16.0.1.0.0', + 'category': 'Tools', + 'summary': """Double Click A Field To Edit The Label""", + 'description': """Double Click A Field To Edit The Label""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base'], + 'data': [ + 'security/ir.model.access.csv', + 'views/res_user.xml', + 'views/settings_view.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'edit_label/static/src/js/edit_string.js', + 'edit_label/static/src/xml/edit_string.xml' + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/edit_label/doc/RELEASE_NOTES.md b/edit_label/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..ccdb219de --- /dev/null +++ b/edit_label/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 04.11.2022 +#### Version 16.0.1.0.0 +##### ADD +- Initial commit for Double Click Field Label Edit diff --git a/edit_label/models/__init__.py b/edit_label/models/__init__.py new file mode 100644 index 000000000..06df1eb3c --- /dev/null +++ b/edit_label/models/__init__.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import res_user +from . import model_view +from . import history_data + + + diff --git a/edit_label/models/history_data.py b/edit_label/models/history_data.py new file mode 100644 index 000000000..02255f864 --- /dev/null +++ b/edit_label/models/history_data.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from odoo import api, fields, models + + +class FieldModels(models.Model): + _name = 'label.history' + + edited_person = fields.Many2one('res.users', string='Changed by') + date = fields.Datetime(string='Changed On') + model = fields.Char(string='Model Name') + old_label = fields.Char(string='Label Before Change') + new_label = fields.Char(string='Label After Change') + + + + diff --git a/edit_label/models/model_view.py b/edit_label/models/model_view.py new file mode 100644 index 000000000..08a08f9e3 --- /dev/null +++ b/edit_label/models/model_view.py @@ -0,0 +1,114 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from odoo import api, fields, models +from xml.etree import ElementTree +import itertools + + +class FieldModels(models.Model): + _inherit = 'ir.ui.view' + + flag = fields.Boolean(default=False) + + @api.model + def edit_xml_field_label(self, name, view, field, input_field_name, value, + field_name): + views = self.env['ir.ui.view'].search([('model', '=', name), + ('type', '=', view)]) + model_name = self.env['ir.model'].search([('model', '=', name)]).name + use_lang = self.env.context.get('lang') or 'en_US' + for view_id in views: + root = ElementTree.fromstring(view_id.arch) + + for rank in root.iter('label'): + if rank.get('string') == field: + self.flag = True + rank.set('string', value) + vals = ElementTree.tostring(root, encoding='unicode') + final_view = self.env['ir.ui.view'].sudo().search( + [('model', '=', name), + ('type', '=', view), + ('xml_id', '=', view_id.xml_id), + ]) + for num in final_view.filtered( + lambda l: l.xml_id == view_id.xml_id): + num.arch = vals + + vals = { + 'edited_person': self.env.user.id, + 'date': fields.Datetime.now(), + 'model': model_name, + 'old_label': field, + 'new_label': value, + } + self.env['label.history'].sudo().create(vals) + + for rank in root.iter('field'): + if rank.get('string') == field: + self.flag = True + rank.set('string', value) + vals = ElementTree.tostring(root, encoding='unicode') + final_view = self.env['ir.ui.view'].sudo().search( + [('model', '=', name), + ('type', '=', view), + ('xml_id', '=', view_id.xml_id), + ]) + for num in final_view.filtered( + lambda l: l.xml_id == view_id.xml_id): + num.arch = vals + + vals = { + 'edited_person': self.env.user.id, + 'date': fields.Datetime.now(), + 'model': model_name, + 'old_label': field, + 'new_label': value, + } + self.env['label.history'].sudo().create(vals) + + if self.flag: + return True + + else: + try: + self.env.cr.execute(""" + UPDATE ir_model_fields SET field_description = '{"%s":"%s"}' WHERE model = '%s' AND name = '%s' + """ % (use_lang, value, name, input_field_name)) + + # self.env.cr.execute(""" + # UPDATE ir_model_fields SET field_description = '%s' WHERE model = '%s' AND name = '%s' + # """ % (value, name, field_name)) + + vals = { + 'edited_person': self.env.user.id, + 'date': fields.Datetime.now(), + 'model': model_name, + 'old_label': field, + 'new_label': value, + } + self.env['label.history'].sudo().create(vals) + self.env.cr.commit() + self.env['ir.model.fields'].clear_caches() + return True + except Exception as e: + return False diff --git a/edit_label/models/res_user.py b/edit_label/models/res_user.py new file mode 100644 index 000000000..c7451cd5b --- /dev/null +++ b/edit_label/models/res_user.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from odoo import api, fields, models + + +class ResUser(models.Model): + _inherit = 'res.users' + + edit_field_label = fields.Boolean(string='Edit Field Label', default=False) + + @api.model + def login_user(self): + user = self.env.user + return user.edit_field_label diff --git a/edit_label/security/ir.model.access.csv b/edit_label/security/ir.model.access.csv new file mode 100644 index 000000000..02ba4cc86 --- /dev/null +++ b/edit_label/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_label_history,label.history,model_label_history,base.group_user,1,0,0,0 diff --git a/edit_label/static/description/assets/icons/check.png b/edit_label/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/edit_label/static/description/assets/icons/check.png differ diff --git a/edit_label/static/description/assets/icons/chevron.png b/edit_label/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/edit_label/static/description/assets/icons/chevron.png differ diff --git a/edit_label/static/description/assets/icons/cogs.png b/edit_label/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/edit_label/static/description/assets/icons/cogs.png differ diff --git a/edit_label/static/description/assets/icons/consultation.png b/edit_label/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/edit_label/static/description/assets/icons/consultation.png differ diff --git a/edit_label/static/description/assets/icons/ecom-black.png b/edit_label/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/edit_label/static/description/assets/icons/ecom-black.png differ diff --git a/edit_label/static/description/assets/icons/education-black.png b/edit_label/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/edit_label/static/description/assets/icons/education-black.png differ diff --git a/edit_label/static/description/assets/icons/hotel-black.png b/edit_label/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/edit_label/static/description/assets/icons/hotel-black.png differ diff --git a/edit_label/static/description/assets/icons/license.png b/edit_label/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/edit_label/static/description/assets/icons/license.png differ diff --git a/edit_label/static/description/assets/icons/lifebuoy.png b/edit_label/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/edit_label/static/description/assets/icons/lifebuoy.png differ diff --git a/edit_label/static/description/assets/icons/manufacturing-black.png b/edit_label/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/edit_label/static/description/assets/icons/manufacturing-black.png differ diff --git a/edit_label/static/description/assets/icons/pos-black.png b/edit_label/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/edit_label/static/description/assets/icons/pos-black.png differ diff --git a/edit_label/static/description/assets/icons/puzzle.png b/edit_label/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/edit_label/static/description/assets/icons/puzzle.png differ diff --git a/edit_label/static/description/assets/icons/restaurant-black.png b/edit_label/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/edit_label/static/description/assets/icons/restaurant-black.png differ diff --git a/edit_label/static/description/assets/icons/service-black.png b/edit_label/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/edit_label/static/description/assets/icons/service-black.png differ diff --git a/edit_label/static/description/assets/icons/trading-black.png b/edit_label/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/edit_label/static/description/assets/icons/trading-black.png differ diff --git a/edit_label/static/description/assets/icons/training.png b/edit_label/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/edit_label/static/description/assets/icons/training.png differ diff --git a/edit_label/static/description/assets/icons/update.png b/edit_label/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/edit_label/static/description/assets/icons/update.png differ diff --git a/edit_label/static/description/assets/icons/user.png b/edit_label/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/edit_label/static/description/assets/icons/user.png differ diff --git a/edit_label/static/description/assets/icons/wrench.png b/edit_label/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/edit_label/static/description/assets/icons/wrench.png differ diff --git a/edit_label/static/description/assets/misc/categories.png b/edit_label/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/edit_label/static/description/assets/misc/categories.png differ diff --git a/edit_label/static/description/assets/misc/check-box.png b/edit_label/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/edit_label/static/description/assets/misc/check-box.png differ diff --git a/edit_label/static/description/assets/misc/compass.png b/edit_label/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/edit_label/static/description/assets/misc/compass.png differ diff --git a/edit_label/static/description/assets/misc/corporate.png b/edit_label/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/edit_label/static/description/assets/misc/corporate.png differ diff --git a/edit_label/static/description/assets/misc/customer-support.png b/edit_label/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/edit_label/static/description/assets/misc/customer-support.png differ diff --git a/edit_label/static/description/assets/misc/cybrosys-logo.png b/edit_label/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/edit_label/static/description/assets/misc/cybrosys-logo.png differ diff --git a/edit_label/static/description/assets/misc/features.png b/edit_label/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/edit_label/static/description/assets/misc/features.png differ diff --git a/edit_label/static/description/assets/misc/logo.png b/edit_label/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/edit_label/static/description/assets/misc/logo.png differ diff --git a/edit_label/static/description/assets/misc/pictures.png b/edit_label/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/edit_label/static/description/assets/misc/pictures.png differ diff --git a/edit_label/static/description/assets/misc/pie-chart.png b/edit_label/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/edit_label/static/description/assets/misc/pie-chart.png differ diff --git a/edit_label/static/description/assets/misc/right-arrow.png b/edit_label/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/edit_label/static/description/assets/misc/right-arrow.png differ diff --git a/edit_label/static/description/assets/misc/star.png b/edit_label/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/edit_label/static/description/assets/misc/star.png differ diff --git a/edit_label/static/description/assets/misc/support.png b/edit_label/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/edit_label/static/description/assets/misc/support.png differ diff --git a/edit_label/static/description/assets/misc/whatsapp.png b/edit_label/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/edit_label/static/description/assets/misc/whatsapp.png differ diff --git a/edit_label/static/description/assets/modules/1.png b/edit_label/static/description/assets/modules/1.png new file mode 100644 index 000000000..5238bdeab Binary files /dev/null and b/edit_label/static/description/assets/modules/1.png differ diff --git a/edit_label/static/description/assets/modules/2.png b/edit_label/static/description/assets/modules/2.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/edit_label/static/description/assets/modules/2.png differ diff --git a/edit_label/static/description/assets/modules/3.png b/edit_label/static/description/assets/modules/3.png new file mode 100644 index 000000000..3c3ff1afb Binary files /dev/null and b/edit_label/static/description/assets/modules/3.png differ diff --git a/edit_label/static/description/assets/modules/4.png b/edit_label/static/description/assets/modules/4.png new file mode 100644 index 000000000..3fae4631e Binary files /dev/null and b/edit_label/static/description/assets/modules/4.png differ diff --git a/edit_label/static/description/assets/modules/5.gif b/edit_label/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/edit_label/static/description/assets/modules/5.gif differ diff --git a/edit_label/static/description/assets/modules/6.png b/edit_label/static/description/assets/modules/6.png new file mode 100644 index 000000000..7f2815273 Binary files /dev/null and b/edit_label/static/description/assets/modules/6.png differ diff --git a/edit_label/static/description/assets/screenshots/hero.gif b/edit_label/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..c7555db09 Binary files /dev/null and b/edit_label/static/description/assets/screenshots/hero.gif differ diff --git a/edit_label/static/description/assets/screenshots/img1.png b/edit_label/static/description/assets/screenshots/img1.png new file mode 100644 index 000000000..063680544 Binary files /dev/null and b/edit_label/static/description/assets/screenshots/img1.png differ diff --git a/edit_label/static/description/assets/screenshots/img2.png b/edit_label/static/description/assets/screenshots/img2.png new file mode 100644 index 000000000..f6077f0bd Binary files /dev/null and b/edit_label/static/description/assets/screenshots/img2.png differ diff --git a/edit_label/static/description/assets/screenshots/img3.png b/edit_label/static/description/assets/screenshots/img3.png new file mode 100644 index 000000000..a6bf67978 Binary files /dev/null and b/edit_label/static/description/assets/screenshots/img3.png differ diff --git a/edit_label/static/description/assets/screenshots/img4.png b/edit_label/static/description/assets/screenshots/img4.png new file mode 100644 index 000000000..a765440ee Binary files /dev/null and b/edit_label/static/description/assets/screenshots/img4.png differ diff --git a/edit_label/static/description/assets/screenshots/img5.png b/edit_label/static/description/assets/screenshots/img5.png new file mode 100644 index 000000000..39d3e538c Binary files /dev/null and b/edit_label/static/description/assets/screenshots/img5.png differ diff --git a/edit_label/static/description/banner.png b/edit_label/static/description/banner.png new file mode 100644 index 000000000..3fe28cd4a Binary files /dev/null and b/edit_label/static/description/banner.png differ diff --git a/edit_label/static/description/icon.png b/edit_label/static/description/icon.png new file mode 100644 index 000000000..9917764f3 Binary files /dev/null and b/edit_label/static/description/icon.png differ diff --git a/edit_label/static/description/index.html b/edit_label/static/description/index.html new file mode 100644 index 000000000..5d0b60db0 --- /dev/null +++ b/edit_label/static/description/index.html @@ -0,0 +1,544 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ + + +

Double Click Field Label Edit

+

A Module For Change Field Label.

+ + + +
+ + +
+
+ +
+

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This module is helps to edit the field label in UI +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ +
+ Double Click Field Label Edit + + +
+
+ +
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Administrator can give access to edit the label

+

From settings, Administrator can give access for user to edit the label.

+ +
+ +
+

Double Click Edit Field Label

+

Double click on the label, and you can add the new label.

+ +
+ +
+

Label Added

+

New label is added.

+ +
+
+

History

+

In settings => technical => Label change history.

+ +
+
+

History

+

In Label change history, You can see the details of changed label.

+ +
+ +
+
+ + + +
+
+ +
+

Related + Products +

+
+
+
+ +
+
+ + + + +
+
+ +
+

Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+ +
+ + + + + +
+
+ +
+

Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + + +
+
+ +
+

Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/edit_label/static/src/js/edit_string.js b/edit_label/static/src/js/edit_string.js new file mode 100644 index 000000000..dc7f0c829 --- /dev/null +++ b/edit_label/static/src/js/edit_string.js @@ -0,0 +1,81 @@ +/** @odoo-module */ +import { formView } from "@web/views/form/form_view"; +import { FormLabel } from "@web/views/form/form_label"; +const { useState, Component } = owl; +const components = formView.Renderer.components; +import { ForecastedButtons } from "@stock/stock_forecasted/forecasted_buttons"; +import { patch } from '@web/core/utils/patch'; +var rpc = require('web.rpc'); + +const { onWillStart } = owl; + +patch(FormLabel.prototype, 'edit_label.FormLabel',{ + setup() { + this._super.apply(); + }, + + async onDblClick(ev){ + this.access = false + var self = this; + rpc.query({ + model: 'res.users', + method: 'login_user', + args: [], + }).then(function(result) { + if(result === true){ + self.field_name = '' + var $label = $(ev.target); + self.label = $label; + self.field_name = $label[0].innerText; + if($label[0].localName === 'label'){ + var value = $($label).replaceWith(`${$(self).text()}`); + document.getElementById("label_edit").onblur = function() {self.myFunction(event)}; + } + } + }); + + }, + myFunction(event) { + var self = this; + var ModelName = this.props.record.resModel + var ViewType = this.props.record.__viewType + var inputField = this.field_name + var inputValue = $('.edit_label').val(); + var label_for = $(event.target).data('label_for'); + var field_tech_name; + var inputFieldName; + var ids = this.idsForLabels + if(this.label[0].htmlFor){ + var inputFieldName = this.label[0].htmlFor + var inputFieldLabel = this.field_name + } + + rpc.query({ + model: 'ir.ui.view', + method: 'edit_xml_field_label', + args: [ModelName, ViewType, inputField, inputFieldName, inputValue, field_tech_name], + }).then(function(result) { + if (result === true) { + self.label[0].innerText = inputValue; + $('.edit_label').replaceWith(self.label); + location.reload(); + } + else{ + console.log("Error")} + + }); + + } +}); +//export class FormLabelDouble extends FormLabel { +// setup() { +// super.setup(); +// useListener('double-click', this.onDblClick()); +// } +// onDblClick() { +// console.log('hai here') +// } +// +//} +//FormLabelDouble.template = "edit_label.FormLabel"; +//console.log(FormLabelDouble, "lll") \ No newline at end of file diff --git a/edit_label/static/src/xml/edit_string.xml b/edit_label/static/src/xml/edit_string.xml new file mode 100644 index 000000000..34e1eebea --- /dev/null +++ b/edit_label/static/src/xml/edit_string.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/edit_label/views/res_user.xml b/edit_label/views/res_user.xml new file mode 100644 index 000000000..0fa25f00e --- /dev/null +++ b/edit_label/views/res_user.xml @@ -0,0 +1,28 @@ + + + + res.users.inherit + res.users + + + + + + + + + + + + + + + + + + + + + + + diff --git a/edit_label/views/settings_view.xml b/edit_label/views/settings_view.xml new file mode 100644 index 000000000..9a7e230bf --- /dev/null +++ b/edit_label/views/settings_view.xml @@ -0,0 +1,29 @@ + + + + + History + label.history + + + + + + + + + + + + + + Label History + label.history + tree + {} + + + + + +