diff --git a/edit_label/README.rst b/edit_label/README.rst new file mode 100644 index 000000000..abcd90289 --- /dev/null +++ b/edit_label/README.rst @@ -0,0 +1,37 @@ +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 + +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..f2c5a4636 --- /dev/null +++ b/edit_label/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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..47b2da2a2 --- /dev/null +++ b/edit_label/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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': '15.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/EditString.js' + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/edit_label/models/__init__.py b/edit_label/models/__init__.py new file mode 100644 index 000000000..7a9f68b87 --- /dev/null +++ b/edit_label/models/__init__.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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..86979d9ca --- /dev/null +++ b/edit_label/models/history_data.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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..78d38238e --- /dev/null +++ b/edit_label/models/model_view.py @@ -0,0 +1,111 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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, model_name): + views = self.env['ir.ui.view'].search([('model', '=', name), + ('type', '=', view)]) + 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) + + print('flag', self.flag) + if self.flag: + return True + + else: + try: + self.env.cr.execute(""" + UPDATE ir_model_fields SET field_description = '%s' WHERE model = '%s' AND name = '%s' + """ % (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() + print('trueeeee') + return True + except Exception as e: + print(str(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..d0e996962 --- /dev/null +++ b/edit_label/models/res_user.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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/logo.png b/edit_label/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/edit_label/static/description/assets/icons/logo.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/modules/budget_image.png b/edit_label/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/edit_label/static/description/assets/modules/budget_image.png differ diff --git a/edit_label/static/description/assets/modules/credit_image.png b/edit_label/static/description/assets/modules/credit_image.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/edit_label/static/description/assets/modules/credit_image.png differ diff --git a/edit_label/static/description/assets/modules/employee_image.png b/edit_label/static/description/assets/modules/employee_image.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/edit_label/static/description/assets/modules/employee_image.png differ diff --git a/edit_label/static/description/assets/modules/export_image.png b/edit_label/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/edit_label/static/description/assets/modules/export_image.png differ diff --git a/edit_label/static/description/assets/modules/gantt_image.png b/edit_label/static/description/assets/modules/gantt_image.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/edit_label/static/description/assets/modules/gantt_image.png differ diff --git a/edit_label/static/description/assets/modules/quotation_image.png b/edit_label/static/description/assets/modules/quotation_image.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/edit_label/static/description/assets/modules/quotation_image.png differ diff --git a/edit_label/static/description/assets/screenshots/conf_setting.png b/edit_label/static/description/assets/screenshots/conf_setting.png new file mode 100644 index 000000000..1f1e8b768 Binary files /dev/null and b/edit_label/static/description/assets/screenshots/conf_setting.png differ diff --git a/edit_label/static/description/assets/screenshots/edit_label.png b/edit_label/static/description/assets/screenshots/edit_label.png new file mode 100644 index 000000000..b58de7780 Binary files /dev/null and b/edit_label/static/description/assets/screenshots/edit_label.png differ diff --git a/edit_label/static/description/assets/screenshots/edited_label.png b/edit_label/static/description/assets/screenshots/edited_label.png new file mode 100644 index 000000000..98f819426 Binary files /dev/null and b/edit_label/static/description/assets/screenshots/edited_label.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..6df4b053b Binary files /dev/null and b/edit_label/static/description/assets/screenshots/hero.gif differ diff --git a/edit_label/static/description/assets/screenshots/history_1.png b/edit_label/static/description/assets/screenshots/history_1.png new file mode 100644 index 000000000..c302d1e58 Binary files /dev/null and b/edit_label/static/description/assets/screenshots/history_1.png differ diff --git a/edit_label/static/description/assets/screenshots/history_2.png b/edit_label/static/description/assets/screenshots/history_2.png new file mode 100644 index 000000000..159c7c682 Binary files /dev/null and b/edit_label/static/description/assets/screenshots/history_2.png differ diff --git a/edit_label/static/description/banner.png b/edit_label/static/description/banner.png new file mode 100644 index 000000000..e8672ece5 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..c8d5fd1b4 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..2f57869bd --- /dev/null +++ b/edit_label/static/description/index.html @@ -0,0 +1,570 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ Double Click Field Label Edit

+

+ A Module For Change Field Label +

+ +
+
+ + + +
+
+

+ 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. +

+ +
+ + +
+ +
+
+

Suggested 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

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

Need Help?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/edit_label/static/src/js/EditString.js b/edit_label/static/src/js/EditString.js new file mode 100644 index 000000000..db4ec3c53 --- /dev/null +++ b/edit_label/static/src/js/EditString.js @@ -0,0 +1,86 @@ +odoo.define('Edit_label.EditString', function(require) { + "use strict"; + + var FormRenderer = require('web.FormRenderer'); + var rpc = require('web.rpc'); + const ajax = require('web.ajax'); + + + FormRenderer.include({ + events: _.extend({}, FormRenderer.prototype.events, { + 'dblclick': '_onFormviewDblClick', + 'blur .edit_label': '_onBlur' + }), + label: '', + _onFormviewDblClick: function(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 = '' + console.log() + var $label = $(ev.target); + self.label = $label; + self.field_name = $label[0].innerText; + if($label[0].localName === 'label'){ + var value = $($label).replaceWith(`${$(self).text()}`); + } + } + }); + }, + + + _onBlur: function(event) { + var self = this; + var ModelName = this.state.model + var ViewType = this.state.viewType + var inputModel = this.arch.attrs.string; + 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 + for (var item in ids){ + if(ids[item] === this.label[0].htmlFor){ + var inputFieldName = item + var inputFieldLabel = this.field_name + } + } +// try{ +// field_tech_name = $('#'+label_for)[0].attributes.name.nodeValue; +// } +// catch{ +// var ids = this.idsForLabels +// for (var item in ids){ +// if(ids[item] === this.label[0].htmlFor){ +// var inputFieldName = item +// 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, inputModel], + }).then(function(result) { + if (result === true) { + self.label[0].innerText = inputValue; + $('.edit_label').replaceWith(self.label); + location.reload(); + } + else{ + console.log("Error")} + + }); + + } + + }); + + +}); \ No newline at end of file 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 + {} + + + + + +