3
0
Fork 0

[FIX] fix according to review

7.0
Damien Crier 2015-06-08 09:07:15 +02:00
parent 7a48445c18
commit a5dfee75b6
3 changed files with 33 additions and 20 deletions

View File

@ -1,26 +1,13 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3 :alt: License: AGPL-3
Module name web_warning_on_save
=========== ===========
This module was written to extend the functionality of saving a record in the web interface. This module was written to extend the functionality of saving a record in the web interface.
/!\/!\/!\ In no way this module stops the save of the record. You must consider this as a warning displayed /!\/!\/!\ In no way this module stops the save of the record. You must consider this as a warning displayed
to the user AFTER save completed. /!\/!\/!\ to the user AFTER save completed. /!\/!\/!\
If you don't want OpenERP to save the record, you should use constraints.
Installation
============
To install this module, you need to:
* install it
Configuration
=============
To configure this module, you need to:
* nothing
Usage Usage
===== =====
@ -47,9 +34,6 @@ For further information, please visit:
* https://www.odoo.com/forum/help-1 * https://www.odoo.com/forum/help-1
Known issues / Roadmap
======================
Bug Tracker Bug Tracker
=========== ===========

View File

@ -19,4 +19,4 @@
# #
############################################################################## ##############################################################################
import controller from . import controller

View File

@ -25,6 +25,36 @@
"author": "Camptocamp,Odoo Community Association (OCA)", "author": "Camptocamp,Odoo Community Association (OCA)",
'license': 'AGPL-3', 'license': 'AGPL-3',
'website': 'http://www.camptocamp.com', 'website': 'http://www.camptocamp.com',
'description': """
This module was written to extend the functionality of
saving a record in the web interface.
/!\/!\/!\ In no way this module stops the save of the record.
You must consider this as a warning displayed
to the user AFTER save completed. /!\/!\/!\
If you don't want OpenERP to save the record, you should use constraints.
Usage
=====
To use this module, you need to:
* write a method called 'check_warning_on_save' which will make some checks
and return a string
example :
def check_warning_on_save(self, cr, uid, id, context=None):
'''
@param: int: record_id
@return: string: message that should be displayed to the user
'''
res = ""
record = self.browse(cr, uid, id, context=context)
# ... make some checks
return res
""",
'data': [ 'data': [
], ],
'js': [ 'js': [
@ -37,4 +67,3 @@
'installable': True, 'installable': True,
'auto_install': False, 'auto_install': False,
} }
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: