From 3260cd269dbabb9e4efbd0fa38b31715de483923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Thu, 2 Jul 2015 10:27:05 +0200 Subject: [PATCH] [IMP] web_readonly_bypass: port to OCA from acsone-addons --- web_readonly_bypass/README.rst | 74 ++++++++++++++++++++++++++++++ web_readonly_bypass/__init__.py | 27 ----------- web_readonly_bypass/__openerp__.py | 28 +---------- 3 files changed, 76 insertions(+), 53 deletions(-) create mode 100644 web_readonly_bypass/README.rst diff --git a/web_readonly_bypass/README.rst b/web_readonly_bypass/README.rst new file mode 100644 index 00000000..2ffbc11d --- /dev/null +++ b/web_readonly_bypass/README.rst @@ -0,0 +1,74 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +Read Only ByPass +================ + +This module provides a solution to the problem of the interaction between +'readonly' attribute and 'on_change' attribute when used together. It allows +saving onchange modifications to readonly fields. + +Behavior: add readonly fields changed by `on_change` methods to the values +passed to write or create. If `filter_out_readonly` is in the context and +True then apply native behavior. + +Installation +============ + +There are no specific installation instructions for this module. + +Configuration +============= + +There is nothing to configure. + +Usage +===== + +This module changes the default behaviour of Odoo by propagating +on_change modifications to readonly fields to the backend create and write +methods. + +To restore the standard behaviour, set `filter_out_readonly` in the context. + +For further information, please visit: + +* https://www.odoo.com/forum/help-1 + +Known issues / Roadmap +====================== + +None + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed feedback +`here `_. + + +Credits +======= + +Contributors +------------ + +* Jonathan Nemry +* Laetitia Gangloff + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/web_readonly_bypass/__init__.py b/web_readonly_bypass/__init__.py index 5fa4a2b1..40a96afc 100644 --- a/web_readonly_bypass/__init__.py +++ b/web_readonly_bypass/__init__.py @@ -1,28 +1 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Authors: Nemry Jonathan & Laetitia Gangloff -# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) -# All Rights Reserved -# -# WARNING: This program as such is intended to be used by professional -# programmers who take the whole responsibility of assessing all potential -# consequences resulting from its eventual inadequacies and bugs. -# End users who are looking for a ready-to-use solution with commercial -# guarantees and support are strongly advised to contact a Free Software -# Service Company. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License 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 . -# -############################################################################## diff --git a/web_readonly_bypass/__openerp__.py b/web_readonly_bypass/__openerp__.py index 7f6410e1..d54969d7 100644 --- a/web_readonly_bypass/__openerp__.py +++ b/web_readonly_bypass/__openerp__.py @@ -3,14 +3,6 @@ # # Authors: Nemry Jonathan & Laetitia Gangloff # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) -# All Rights Reserved -# -# WARNING: This program as such is intended to be used by professional -# programmers who take the whole responsibility of assessing all potential -# consequences resulting from its eventual inadequacies and bugs. -# End users who are looking for a ready-to-use solution with commercial -# guarantees and support are strongly advised to contact a Free Software -# Service Company. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -30,32 +22,16 @@ 'name': 'Read Only ByPass', 'version': '1.0', "author": "ACSONE SA/NV", - "maintainer": "ACSONE SA/NV", + "maintainer": "ACSONE SA/NV,Odoo Community Association (OCA)", "website": "http://www.acsone.eu", 'category': 'Technical Settings', 'depends': [ - 'base', 'web', ], - 'description': """ -Read Only ByPass -================ -This Module provides a solution to the problem of the interaction between -'readonly' attribute and 'on_change' attribute when used together - -Behavior: add `readonly_fields` changed by `on_change` into the fields passing -into an update or create. If `filter_out_readonly` is into the context and set -True then apply native behavior. - """, - 'images': [], + 'summary': 'Allow to save onchange modifications to readonly fields', 'data': [ 'views/readonly_bypass.xml', ], - 'qweb': [ - ], - 'css': [], - 'demo': [], - 'test': [], 'installable': True, 'auto_install': False, }