From e429f49829604cfbe5f98d607530aee21e9dd783 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 19 Jan 2015 11:02:27 +0100 Subject: [PATCH 1/5] [PRT] Port 8.0 of web_ir_actions_act_window_page --- web_ir_actions_act_window_page/README.md | 12 +++++ .../__init__.py | 0 .../__openerp__.py | 47 ++++-------------- .../static/description}/icon.png | Bin .../src/js/web_ir_actions_act_window_page.js | 6 +-- web_ir_actions_act_window_page/view/qweb.xml | 13 +++++ 6 files changed, 39 insertions(+), 39 deletions(-) create mode 100644 web_ir_actions_act_window_page/README.md rename {__unported__/web_ir_actions_act_window_page => web_ir_actions_act_window_page}/__init__.py (100%) rename {__unported__/web_ir_actions_act_window_page => web_ir_actions_act_window_page}/__openerp__.py (53%) rename {__unported__/web_ir_actions_act_window_page/static/src/img => web_ir_actions_act_window_page/static/description}/icon.png (100%) rename {__unported__/web_ir_actions_act_window_page => web_ir_actions_act_window_page}/static/src/js/web_ir_actions_act_window_page.js (91%) create mode 100644 web_ir_actions_act_window_page/view/qweb.xml diff --git a/web_ir_actions_act_window_page/README.md b/web_ir_actions_act_window_page/README.md new file mode 100644 index 00000000..f7d85b73 --- /dev/null +++ b/web_ir_actions_act_window_page/README.md @@ -0,0 +1,12 @@ +Client side paging +===================== + +This addon enables buttons to return:: + +{'type': 'ir.actions.act_window.page.next'} + +or:: + +{'type': 'ir.actions.act_window.page.prev'} + +which trigger the form's controller to page into the requested direction. diff --git a/__unported__/web_ir_actions_act_window_page/__init__.py b/web_ir_actions_act_window_page/__init__.py similarity index 100% rename from __unported__/web_ir_actions_act_window_page/__init__.py rename to web_ir_actions_act_window_page/__init__.py diff --git a/__unported__/web_ir_actions_act_window_page/__openerp__.py b/web_ir_actions_act_window_page/__openerp__.py similarity index 53% rename from __unported__/web_ir_actions_act_window_page/__openerp__.py rename to web_ir_actions_act_window_page/__openerp__.py index 546b1d6e..70c045b6 100644 --- a/__unported__/web_ir_actions_act_window_page/__openerp__.py +++ b/web_ir_actions_act_window_page/__openerp__.py @@ -2,7 +2,7 @@ ############################################################################## # # OpenERP, Open Source Management Solution -# This module copyright (C) 2013 Therp BV (). +# This module copyright (C) 2013-2015 Therp BV (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -19,39 +19,14 @@ # ############################################################################## { - "name" : "Window actions for client side paging", - "version" : "1.0", - "author" : "Therp BV", - "complexity": "normal", - "description": """ -Client side paging -===================== - -This addon enables buttons to return:: - -{'type': 'ir.actions.act_window.page.next'} - -or:: - -{'type': 'ir.actions.act_window.page.prev'} - -which trigger the form's controller to page into the requested direction. - """, - "category" : "Dependency", - "depends" : [ - ], - "data" : [ - ], - "js": [ - 'static/src/js/web_ir_actions_act_window_page.js', - ], - "css": [ - ], - "qweb": [ - ], - "auto_install": False, - 'installable': False, - "external_dependencies" : { - 'python' : [], - }, + "name": "Window actions for client side paging", + "summary": ("Allows a developer to trigger a pager to show the previous " + "or next next record in the form view by returning the " + "appropriate window action"), + "version": "1.0", + "author": "Therp BV", + "category": "Dependency", + "depends": ['web'], + 'data': ['view/qweb.xml'], + 'installable': True, } diff --git a/__unported__/web_ir_actions_act_window_page/static/src/img/icon.png b/web_ir_actions_act_window_page/static/description/icon.png similarity index 100% rename from __unported__/web_ir_actions_act_window_page/static/src/img/icon.png rename to web_ir_actions_act_window_page/static/description/icon.png diff --git a/__unported__/web_ir_actions_act_window_page/static/src/js/web_ir_actions_act_window_page.js b/web_ir_actions_act_window_page/static/src/js/web_ir_actions_act_window_page.js similarity index 91% rename from __unported__/web_ir_actions_act_window_page/static/src/js/web_ir_actions_act_window_page.js rename to web_ir_actions_act_window_page/static/src/js/web_ir_actions_act_window_page.js index 8210df92..d8c03179 100644 --- a/__unported__/web_ir_actions_act_window_page/static/src/js/web_ir_actions_act_window_page.js +++ b/web_ir_actions_act_window_page/static/src/js/web_ir_actions_act_window_page.js @@ -2,7 +2,7 @@ //############################################################################ // // OpenERP, Open Source Management Solution -// This module copyright (C) 2013 Therp BV (). +// This module copyright (C) 2013-2015 Therp BV (). // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -19,9 +19,9 @@ // //############################################################################ -openerp.web_ir_actions_act_window_page = function(openerp) +openerp.web_ir_actions_act_window_page = function(instance) { - openerp.web.ActionManager.include({ + instance.web.ActionManager.include({ ir_actions_act_window_page_prev: function(action, options) { if(this.inner_widget && this.inner_widget.active_view == 'form' && diff --git a/web_ir_actions_act_window_page/view/qweb.xml b/web_ir_actions_act_window_page/view/qweb.xml new file mode 100644 index 00000000..d3563bb3 --- /dev/null +++ b/web_ir_actions_act_window_page/view/qweb.xml @@ -0,0 +1,13 @@ + + + + + + From 6b8d0da3e5bdf04a0ec535ed57055ccffbb5141b Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 19 Jan 2015 11:10:29 +0100 Subject: [PATCH 2/5] [FIX] Unwellformed RST --- web_ir_actions_act_window_page/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_ir_actions_act_window_page/README.md b/web_ir_actions_act_window_page/README.md index f7d85b73..bfcc71de 100644 --- a/web_ir_actions_act_window_page/README.md +++ b/web_ir_actions_act_window_page/README.md @@ -1,5 +1,5 @@ Client side paging -===================== +================== This addon enables buttons to return:: From 983124bb58f9af8bdb6ae3f39011691d6a0b8d04 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 19 Jan 2015 11:12:49 +0100 Subject: [PATCH 3/5] [IMP] Shorten summary a bit for cosmetic reasons --- web_ir_actions_act_window_page/__openerp__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web_ir_actions_act_window_page/__openerp__.py b/web_ir_actions_act_window_page/__openerp__.py index 70c045b6..7fa66de6 100644 --- a/web_ir_actions_act_window_page/__openerp__.py +++ b/web_ir_actions_act_window_page/__openerp__.py @@ -21,8 +21,7 @@ { "name": "Window actions for client side paging", "summary": ("Allows a developer to trigger a pager to show the previous " - "or next next record in the form view by returning the " - "appropriate window action"), + "or next next record in the form view"), "version": "1.0", "author": "Therp BV", "category": "Dependency", From 8a4b25e18a87e4a2c979ed7ae3bff58a0db1981c Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 19 Jan 2015 11:15:28 +0100 Subject: [PATCH 4/5] [IMP] Description --- web_ir_actions_act_window_page/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web_ir_actions_act_window_page/README.md b/web_ir_actions_act_window_page/README.md index bfcc71de..23a7f551 100644 --- a/web_ir_actions_act_window_page/README.md +++ b/web_ir_actions_act_window_page/README.md @@ -1,7 +1,7 @@ Client side paging ================== -This addon enables buttons to return:: +This addon allows a developer to return the following action types:: {'type': 'ir.actions.act_window.page.next'} @@ -9,4 +9,6 @@ or:: {'type': 'ir.actions.act_window.page.prev'} -which trigger the form's controller to page into the requested direction. +which trigger the form's controller to page into the requested direction on the +client side. + From c57d53b93135f2ff9bf76f2fa9fc2f57c64b2b9c Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 19 Jan 2015 11:16:17 +0100 Subject: [PATCH 5/5] [IMP] Remove empty line --- web_ir_actions_act_window_page/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/web_ir_actions_act_window_page/README.md b/web_ir_actions_act_window_page/README.md index 23a7f551..c5c6351b 100644 --- a/web_ir_actions_act_window_page/README.md +++ b/web_ir_actions_act_window_page/README.md @@ -11,4 +11,3 @@ or:: which trigger the form's controller to page into the requested direction on the client side. -