From 8860f891bb56849a0d6fce731446975de1111d12 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 2 Dec 2013 11:30:01 +0100 Subject: [PATCH 01/18] [IMP] Terminology --- web_ir_actions_act_window_page/__init__.py | 20 ++++++ web_ir_actions_act_window_page/__openerp__.py | 57 ++++++++++++++++++ .../static/src/img/icon.png | Bin 0 -> 7939 bytes .../src/js/web_ir_actions_act_window_page.js | 44 ++++++++++++++ 4 files changed, 121 insertions(+) create mode 100644 web_ir_actions_act_window_page/__init__.py create mode 100644 web_ir_actions_act_window_page/__openerp__.py create mode 100644 web_ir_actions_act_window_page/static/src/img/icon.png create mode 100644 web_ir_actions_act_window_page/static/src/js/web_ir_actions_act_window_page.js diff --git a/web_ir_actions_act_window_page/__init__.py b/web_ir_actions_act_window_page/__init__.py new file mode 100644 index 000000000000..f69741171a11 --- /dev/null +++ b/web_ir_actions_act_window_page/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 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 +# 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_ir_actions_act_window_page/__openerp__.py b/web_ir_actions_act_window_page/__openerp__.py new file mode 100644 index 000000000000..31054808f93e --- /dev/null +++ b/web_ir_actions_act_window_page/__openerp__.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 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 +# 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 . +# +############################################################################## +{ + "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": True, + "external_dependencies" : { + 'python' : [], + }, +} diff --git a/web_ir_actions_act_window_page/static/src/img/icon.png b/web_ir_actions_act_window_page/static/src/img/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f1006195e0220e5b38e4a1b8f17870ec9359f7bb GIT binary patch literal 7939 zcmV+eAN=5nP)2wk@lR!X%5@omqLQoK55FAmjS7i{dSA3$P zzIWGpF5g@Fp8Bp&ukT*H4h$*?s1O4r5R!C8GIo+qce>N_R9$1&8TQ`qkF!s8b*BRX zFM%xBD`!=8)j6lCzVrQlzwbAk0Pn1K);sGwUgQlvKLcO_2muHHpa2{I;{b91Tmb5P z29UkM7bgIq6hIw-nE+}46zlg~00Mw~J2IC7-~bH$NT*>l2T%@R#m0?)eR5!6#2OkJ zwfYB!GR@7+>j2CG5T53^!gCw?B9pf=5U-V0hW_Ct8lY0mDpQ}2>K`4_@6BwQGxy!x zFigg|X_|rXefNE7LjfBLkK+J>1?MgU5GgSK^BzE^!K(t$w07-{?`dpoTmqm$|KO

>GG0jNr_StN-8L&uw?17%KDt|b@K@T5Q5>Mp~PoC{qdi)w6vVK?6S*CKJu}Tt(w!+Jh!H% zrnaJ@BE~qU{=W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v3NT$@U->FBkRSK!fqdcgml%9T*sY32vJgq tN6+Hech)=Wo%POoXT7uDS#R0({{b$rzUWE6E0F*I002ovPDHLkV1nr_+@t^i literal 0 HcmV?d00001 diff --git a/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 new file mode 100644 index 000000000000..8210df927a03 --- /dev/null +++ b/web_ir_actions_act_window_page/static/src/js/web_ir_actions_act_window_page.js @@ -0,0 +1,44 @@ +//-*- coding: utf-8 -*- +//############################################################################ +// +// OpenERP, Open Source Management Solution +// This module copyright (C) 2013 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 +// 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 . +// +//############################################################################ + +openerp.web_ir_actions_act_window_page = function(openerp) +{ + openerp.web.ActionManager.include({ + ir_actions_act_window_page_prev: function(action, options) + { + if(this.inner_widget && this.inner_widget.active_view == 'form' && + this.inner_widget.views[this.inner_widget.active_view]) + { + this.inner_widget.views[this.inner_widget.active_view] + .controller.execute_pager_action('previous'); + } + }, + ir_actions_act_window_page_next: function(action, options) + { + if(this.inner_widget && this.inner_widget.active_view == 'form' && + this.inner_widget.views[this.inner_widget.active_view]) + { + this.inner_widget.views[this.inner_widget.active_view] + .controller.execute_pager_action('next'); + } + }, + }); +} From 3bd727d65e14ed3049408e1f9ab25e04dcfd9724 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Mon, 7 Jul 2014 13:11:28 +0200 Subject: [PATCH 02/18] move all addons to __unported__, set all addons as not installable --- web_ir_actions_act_window_page/__init__.py | 20 ------ web_ir_actions_act_window_page/__openerp__.py | 57 ------------------ .../static/src/img/icon.png | Bin 7939 -> 0 bytes .../src/js/web_ir_actions_act_window_page.js | 44 -------------- 4 files changed, 121 deletions(-) delete mode 100644 web_ir_actions_act_window_page/__init__.py delete mode 100644 web_ir_actions_act_window_page/__openerp__.py delete mode 100644 web_ir_actions_act_window_page/static/src/img/icon.png delete mode 100644 web_ir_actions_act_window_page/static/src/js/web_ir_actions_act_window_page.js diff --git a/web_ir_actions_act_window_page/__init__.py b/web_ir_actions_act_window_page/__init__.py deleted file mode 100644 index f69741171a11..000000000000 --- a/web_ir_actions_act_window_page/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2013 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 -# 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_ir_actions_act_window_page/__openerp__.py b/web_ir_actions_act_window_page/__openerp__.py deleted file mode 100644 index 31054808f93e..000000000000 --- a/web_ir_actions_act_window_page/__openerp__.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2013 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 -# 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 . -# -############################################################################## -{ - "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": True, - "external_dependencies" : { - 'python' : [], - }, -} diff --git a/web_ir_actions_act_window_page/static/src/img/icon.png b/web_ir_actions_act_window_page/static/src/img/icon.png deleted file mode 100644 index f1006195e0220e5b38e4a1b8f17870ec9359f7bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7939 zcmV+eAN=5nP)2wk@lR!X%5@omqLQoK55FAmjS7i{dSA3$P zzIWGpF5g@Fp8Bp&ukT*H4h$*?s1O4r5R!C8GIo+qce>N_R9$1&8TQ`qkF!s8b*BRX zFM%xBD`!=8)j6lCzVrQlzwbAk0Pn1K);sGwUgQlvKLcO_2muHHpa2{I;{b91Tmb5P z29UkM7bgIq6hIw-nE+}46zlg~00Mw~J2IC7-~bH$NT*>l2T%@R#m0?)eR5!6#2OkJ zwfYB!GR@7+>j2CG5T53^!gCw?B9pf=5U-V0hW_Ct8lY0mDpQ}2>K`4_@6BwQGxy!x zFigg|X_|rXefNE7LjfBLkK+J>1?MgU5GgSK^BzE^!K(t$w07-{?`dpoTmqm$|KO

>GG0jNr_StN-8L&uw?17%KDt|b@K@T5Q5>Mp~PoC{qdi)w6vVK?6S*CKJu}Tt(w!+Jh!H% zrnaJ@BE~qU{=WVPW-=LTbaZ66f1tl->(;Hi|L6C!9-2VNej}E<6{U3jg4CDZe?c2BYe(=^0c}!9S zgeX7)ZSCDwduOlhI4Z(83vfyUlu>X-K_~^K6ogQ&6baalM0_lZM5-H{5hq$4a%MKv zhD?)_Lc{3m?MqH0Y1CUCKr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~QW;2{3UbC!8jB*6NsSE*CBsVKYahSky1)J{ zLi&v|_t(Ng0>C)1f0uao>Z{=jd!RU2G+Tj8>c#k`$hoKUPIe8Tw|^Lw6{S#8VPI$! zxt!zO^P;>KM)S~HmV?f&emJh1uMioWO{!hy$LR<`RQI9diShDeGI{hL@49{L zdIEIrz7u6>J9Qlm7O>Cwefz z&rC{V5wz^wEmCQV+qNB9ym&?3!Gn8Jg)WGlXACR@&>Sg=HQs&Sw;LnTm?@+{Hk%cd zm1RLMdmwok!YG}lb4X9?I~V59{`1mU1cX5C+IK?Pj-ZBNMi*ar$>Iy<&iHjpON*GU zt@&18LT4>4Yp%PsGZw1|3Rgh50@-o5q_3y9-!u#aOaq3&VVV=0VQ`rKW*RU|1Ey){ z*G}I*8VSQRIbPbfcPO2)nEyG9^3}8FzGvC%EhfAbmJMLEuc!Z|OE152ol*!TlVk0< z+&HscRvC?$V%_3)^?nILWn^SQYNH& z^2_&b_#fx15A<1>h{t;qHg#7%{qT>iZQHih%$(Ky{yRSLrT@17pc|V%CpR{C?wr_k zz3K^HMWk_|cEPG4@(VJI==?b!q8jZT;*X z*A+7WU@Vzs&%bmuwqtjPsw@v>%1et_aZ!ksltd-t+_o({o66+uQ#~U^J$<8Pu8@TR zmCu^HY!-lhZwCNv0H**vw_wr5EB)~grBqjZbm)7AVO|$cgsw1*Kw)z$piLi2sqRcB z`RD%LlfzBTi$6^%3j=@|3N3%T04U&%`0mSQGT*i=2b8gyQqk*v`opjH0r&-gcU9Lm z-m(6UFMh~01BO?XRC^_1Yrp@`pY79bAhh9*FaEBsaqh36)SnzBp2XXA-FoZ8Y>JO; z1aSTBcYgK7d+z_Cy665MsxN%y2lt=Fv3NT$@U->FBkRSK!fqdcgml%9T*sY32vJgq tN6+Hech)=Wo%POoXT7uDS#R0({{b$rzUWE6E0F*I002ovPDHLkV1nr_+@t^i diff --git a/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 deleted file mode 100644 index 8210df927a03..000000000000 --- a/web_ir_actions_act_window_page/static/src/js/web_ir_actions_act_window_page.js +++ /dev/null @@ -1,44 +0,0 @@ -//-*- coding: utf-8 -*- -//############################################################################ -// -// OpenERP, Open Source Management Solution -// This module copyright (C) 2013 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 -// 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 . -// -//############################################################################ - -openerp.web_ir_actions_act_window_page = function(openerp) -{ - openerp.web.ActionManager.include({ - ir_actions_act_window_page_prev: function(action, options) - { - if(this.inner_widget && this.inner_widget.active_view == 'form' && - this.inner_widget.views[this.inner_widget.active_view]) - { - this.inner_widget.views[this.inner_widget.active_view] - .controller.execute_pager_action('previous'); - } - }, - ir_actions_act_window_page_next: function(action, options) - { - if(this.inner_widget && this.inner_widget.active_view == 'form' && - this.inner_widget.views[this.inner_widget.active_view]) - { - this.inner_widget.views[this.inner_widget.active_view] - .controller.execute_pager_action('next'); - } - }, - }); -} From 80b4358fb4b01a134c6adabe2d098005f23f1f79 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 19 Jan 2015 11:02:27 +0100 Subject: [PATCH 03/18] [PRT] Port 8.0 of web_ir_actions_act_window_page --- web_ir_actions_act_window_page/README.md | 12 +++++ web_ir_actions_act_window_page/__init__.py | 20 ++++++++ web_ir_actions_act_window_page/__openerp__.py | 32 +++++++++++++ .../static/description/icon.png | Bin 0 -> 7939 bytes .../src/js/web_ir_actions_act_window_page.js | 44 ++++++++++++++++++ web_ir_actions_act_window_page/view/qweb.xml | 13 ++++++ 6 files changed, 121 insertions(+) create mode 100644 web_ir_actions_act_window_page/README.md create mode 100644 web_ir_actions_act_window_page/__init__.py create mode 100644 web_ir_actions_act_window_page/__openerp__.py create mode 100644 web_ir_actions_act_window_page/static/description/icon.png create mode 100644 web_ir_actions_act_window_page/static/src/js/web_ir_actions_act_window_page.js 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 000000000000..f7d85b73c7da --- /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/web_ir_actions_act_window_page/__init__.py b/web_ir_actions_act_window_page/__init__.py new file mode 100644 index 000000000000..f69741171a11 --- /dev/null +++ b/web_ir_actions_act_window_page/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 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 +# 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_ir_actions_act_window_page/__openerp__.py b/web_ir_actions_act_window_page/__openerp__.py new file mode 100644 index 000000000000..70c045b665a8 --- /dev/null +++ b/web_ir_actions_act_window_page/__openerp__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# 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 +# 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 . +# +############################################################################## +{ + "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/web_ir_actions_act_window_page/static/description/icon.png b/web_ir_actions_act_window_page/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f1006195e0220e5b38e4a1b8f17870ec9359f7bb GIT binary patch literal 7939 zcmV+eAN=5nP)2wk@lR!X%5@omqLQoK55FAmjS7i{dSA3$P zzIWGpF5g@Fp8Bp&ukT*H4h$*?s1O4r5R!C8GIo+qce>N_R9$1&8TQ`qkF!s8b*BRX zFM%xBD`!=8)j6lCzVrQlzwbAk0Pn1K);sGwUgQlvKLcO_2muHHpa2{I;{b91Tmb5P z29UkM7bgIq6hIw-nE+}46zlg~00Mw~J2IC7-~bH$NT*>l2T%@R#m0?)eR5!6#2OkJ zwfYB!GR@7+>j2CG5T53^!gCw?B9pf=5U-V0hW_Ct8lY0mDpQ}2>K`4_@6BwQGxy!x zFigg|X_|rXefNE7LjfBLkK+J>1?MgU5GgSK^BzE^!K(t$w07-{?`dpoTmqm$|KO

>GG0jNr_StN-8L&uw?17%KDt|b@K@T5Q5>Mp~PoC{qdi)w6vVK?6S*CKJu}Tt(w!+Jh!H% zrnaJ@BE~qU{=WVPW-=LTbaZ66f1tl->(;Hi|L6C!9-2VNej}E<6{U3jg4CDZe?c2BYe(=^0c}!9S zgeX7)ZSCDwduOlhI4Z(83vfyUlu>X-K_~^K6ogQ&6baalM0_lZM5-H{5hq$4a%MKv zhD?)_Lc{3m?MqH0Y1CUCK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actions_act_window_page/static/src/js/web_ir_actions_act_window_page.js new file mode 100644 index 000000000000..d8c031795efd --- /dev/null +++ b/web_ir_actions_act_window_page/static/src/js/web_ir_actions_act_window_page.js @@ -0,0 +1,44 @@ +//-*- coding: utf-8 -*- +//############################################################################ +// +// OpenERP, Open Source Management Solution +// 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 +// 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 . +// +//############################################################################ + +openerp.web_ir_actions_act_window_page = function(instance) +{ + instance.web.ActionManager.include({ + ir_actions_act_window_page_prev: function(action, options) + { + if(this.inner_widget && this.inner_widget.active_view == 'form' && + this.inner_widget.views[this.inner_widget.active_view]) + { + this.inner_widget.views[this.inner_widget.active_view] + .controller.execute_pager_action('previous'); + } + }, + ir_actions_act_window_page_next: function(action, options) + { + if(this.inner_widget && this.inner_widget.active_view == 'form' && + this.inner_widget.views[this.inner_widget.active_view]) + { + this.inner_widget.views[this.inner_widget.active_view] + .controller.execute_pager_action('next'); + } + }, + }); +} 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 000000000000..d3563bb3d061 --- /dev/null +++ b/web_ir_actions_act_window_page/view/qweb.xml @@ -0,0 +1,13 @@ + + + + + + From 3284b16f53e429adafda6b27179741e3f3ac4b87 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 19 Jan 2015 11:10:29 +0100 Subject: [PATCH 04/18] [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 f7d85b73c7da..bfcc71dec3a0 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 67f09a30c3f958b88dc2fde93e8cb47e5fbad2da Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 19 Jan 2015 11:12:49 +0100 Subject: [PATCH 05/18] [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 70c045b665a8..7fa66de626c4 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 a7f43551aab32a016383b6b1feb8ad2785b14809 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 19 Jan 2015 11:15:28 +0100 Subject: [PATCH 06/18] [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 bfcc71dec3a0..23a7f5510df1 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 80e91523a3d031c1e1c7933e6875ffd141f27319 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 19 Jan 2015 11:16:17 +0100 Subject: [PATCH 07/18] [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 23a7f5510df1..c5c6351ba6d6 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. - From 501070389caa8468203cdfd300584862f4821d1d Mon Sep 17 00:00:00 2001 From: Alexandre Fayolle Date: Mon, 2 Mar 2015 17:29:19 +0100 Subject: [PATCH 08/18] Add OCA as author of OCA addons In order to get visibility on https://www.odoo.com/apps the OCA board has decided to add the OCA as author of all the addons maintained as part of the association. --- web_ir_actions_act_window_page/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_ir_actions_act_window_page/__openerp__.py b/web_ir_actions_act_window_page/__openerp__.py index 7fa66de626c4..08e1dd4cd1c2 100644 --- a/web_ir_actions_act_window_page/__openerp__.py +++ b/web_ir_actions_act_window_page/__openerp__.py @@ -23,7 +23,7 @@ "summary": ("Allows a developer to trigger a pager to show the previous " "or next next record in the form view"), "version": "1.0", - "author": "Therp BV", + "author": "Therp BV,Odoo Community Association (OCA)", "category": "Dependency", "depends": ['web'], 'data': ['view/qweb.xml'], From 2e1a6930222c8043d2da3d68c8f365cb1354adcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 9 Oct 2015 10:03:39 +0200 Subject: [PATCH 09/18] [UPD] prefix versions with 8.0 --- web_ir_actions_act_window_page/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_ir_actions_act_window_page/__openerp__.py b/web_ir_actions_act_window_page/__openerp__.py index 08e1dd4cd1c2..b56cdfeef840 100644 --- a/web_ir_actions_act_window_page/__openerp__.py +++ b/web_ir_actions_act_window_page/__openerp__.py @@ -22,7 +22,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"), - "version": "1.0", + "version": "8.0.1.0.0", "author": "Therp BV,Odoo Community Association (OCA)", "category": "Dependency", "depends": ['web'], From 65673eb68263feed51a202a6d5ad2e6af49ba403 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 14 Oct 2015 02:57:05 +0200 Subject: [PATCH 10/18] [MIG] Make modules uninstallable --- web_ir_actions_act_window_page/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_ir_actions_act_window_page/__openerp__.py b/web_ir_actions_act_window_page/__openerp__.py index b56cdfeef840..ba6679a79983 100644 --- a/web_ir_actions_act_window_page/__openerp__.py +++ b/web_ir_actions_act_window_page/__openerp__.py @@ -27,5 +27,5 @@ "category": "Dependency", "depends": ['web'], 'data': ['view/qweb.xml'], - 'installable': True, + 'installable': False, } From 2461d394a6bdeb61eba4ef2f9b738bc984e338f4 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 6 Oct 2016 16:13:01 +0200 Subject: [PATCH 11/18] [MIG] Rename manifest files --- .../{__openerp__.py => __manifest__.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename web_ir_actions_act_window_page/{__openerp__.py => __manifest__.py} (100%) diff --git a/web_ir_actions_act_window_page/__openerp__.py b/web_ir_actions_act_window_page/__manifest__.py similarity index 100% rename from web_ir_actions_act_window_page/__openerp__.py rename to web_ir_actions_act_window_page/__manifest__.py From 28a175022c582d90de9c864344c65c3eb30b1712 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Tue, 19 Jul 2016 19:20:32 +0200 Subject: [PATCH 12/18] run onclose handler if we got one --- .../static/src/js/web_ir_actions_act_window_page.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/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 index d8c031795efd..1624fbffeb95 100644 --- a/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 @@ -30,6 +30,10 @@ openerp.web_ir_actions_act_window_page = function(instance) this.inner_widget.views[this.inner_widget.active_view] .controller.execute_pager_action('previous'); } + if(options && options.on_close) + { + options.on_close(); + } }, ir_actions_act_window_page_next: function(action, options) { @@ -39,6 +43,10 @@ openerp.web_ir_actions_act_window_page = function(instance) this.inner_widget.views[this.inner_widget.active_view] .controller.execute_pager_action('next'); } + if(options && options.on_close) + { + options.on_close(); + } }, }); } From de868ade5e8f1e8d7f1e45fdaab78ba29e3e7692 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Thu, 14 Sep 2017 13:59:04 +0200 Subject: [PATCH 13/18] [MIG][10.0] web_ir_actions_act_window_page --- web_ir_actions_act_window_page/README.md | 53 +++++++++++++++++++ .../__manifest__.py | 39 +++++--------- .../src/js/web_ir_actions_act_window_page.js | 45 +++++----------- web_ir_actions_act_window_page/view/qweb.xml | 13 ----- .../views/assets.xml | 11 ++++ 5 files changed, 91 insertions(+), 70 deletions(-) delete mode 100644 web_ir_actions_act_window_page/view/qweb.xml create mode 100644 web_ir_actions_act_window_page/views/assets.xml diff --git a/web_ir_actions_act_window_page/README.md b/web_ir_actions_act_window_page/README.md index c5c6351ba6d6..29b6ce9e08cf 100644 --- a/web_ir_actions_act_window_page/README.md +++ b/web_ir_actions_act_window_page/README.md @@ -1,3 +1,8 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +================== Client side paging ================== @@ -11,3 +16,51 @@ or:: which trigger the form's controller to page into the requested direction on the client side. + +A use case could be the case of a validation flow. As a developer, you set up a tree view with a domain on records to be validated. The user opens the first record in a form view and validates the record. The validation method returns the 'next' action type so that the browser window of the user is presented with the next record in the form view. + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/162/10.0 + +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 smash it by providing detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Holger Brunn +* Stefan Rijnhart + +Do not contact contributors directly about support or help with technical issues. + +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 https://odoo-community.org. diff --git a/web_ir_actions_act_window_page/__manifest__.py b/web_ir_actions_act_window_page/__manifest__.py index ba6679a79983..dc4edc9a66d5 100644 --- a/web_ir_actions_act_window_page/__manifest__.py +++ b/web_ir_actions_act_window_page/__manifest__.py @@ -1,31 +1,20 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# 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 -# 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 . -# -############################################################################## +# coding: utf-8 +# © 2013-2015 Therp BV () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) { "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"), - "version": "8.0.1.0.0", "author": "Therp BV,Odoo Community Association (OCA)", - "category": "Dependency", - "depends": ['web'], - 'data': ['view/qweb.xml'], - 'installable': False, + "version": "10.0.1.0.0", + "category": "Technical", + "depends": [ + 'web', + ], + 'data': [ + 'views/assets.xml', + ], + 'installable': True, + 'license': 'AGPL-3', + 'url': 'https://github.com/oca/web', } diff --git a/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 index 1624fbffeb95..b9fbe4fd0f60 100644 --- a/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 @@ -1,34 +1,16 @@ -//-*- coding: utf-8 -*- -//############################################################################ -// -// OpenERP, Open Source Management Solution -// 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 -// 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 . -// -//############################################################################ +// coding: utf-8 +// © 2013-2015 Therp BV () +// License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) +odoo.define('web.ir_actions_act_window_page', function(require) { -openerp.web_ir_actions_act_window_page = function(instance) -{ - instance.web.ActionManager.include({ + var ActionManager = require('web.ActionManager'); + ActionManager.include({ ir_actions_act_window_page_prev: function(action, options) { - if(this.inner_widget && this.inner_widget.active_view == 'form' && - this.inner_widget.views[this.inner_widget.active_view]) + if(this.inner_widget && this.inner_widget.active_view.type == 'form' && + this.inner_widget.active_view) { - this.inner_widget.views[this.inner_widget.active_view] - .controller.execute_pager_action('previous'); + this.inner_widget.active_view.controller.pager.previous(); } if(options && options.on_close) { @@ -37,11 +19,10 @@ openerp.web_ir_actions_act_window_page = function(instance) }, ir_actions_act_window_page_next: function(action, options) { - if(this.inner_widget && this.inner_widget.active_view == 'form' && - this.inner_widget.views[this.inner_widget.active_view]) + if(this.inner_widget && this.inner_widget.active_view.type == 'form' && + this.inner_widget.active_view) { - this.inner_widget.views[this.inner_widget.active_view] - .controller.execute_pager_action('next'); + this.inner_widget.active_view.controller.pager.next(); } if(options && options.on_close) { @@ -49,4 +30,4 @@ openerp.web_ir_actions_act_window_page = function(instance) } }, }); -} +}); diff --git a/web_ir_actions_act_window_page/view/qweb.xml b/web_ir_actions_act_window_page/view/qweb.xml deleted file mode 100644 index d3563bb3d061..000000000000 --- a/web_ir_actions_act_window_page/view/qweb.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/web_ir_actions_act_window_page/views/assets.xml b/web_ir_actions_act_window_page/views/assets.xml new file mode 100644 index 000000000000..f045d63ac603 --- /dev/null +++ b/web_ir_actions_act_window_page/views/assets.xml @@ -0,0 +1,11 @@ + + + + From e5afeed282d6fd18897cd30d5a2ac618fd232baf Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Thu, 14 Sep 2017 21:38:07 +0200 Subject: [PATCH 14/18] [ADD] Demo data for testing --- web_ir_actions_act_window_page/README.md | 2 ++ .../__manifest__.py | 3 ++ .../demo/demo_action.xml | 35 +++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 web_ir_actions_act_window_page/demo/demo_action.xml diff --git a/web_ir_actions_act_window_page/README.md b/web_ir_actions_act_window_page/README.md index 29b6ce9e08cf..6818c58696bd 100644 --- a/web_ir_actions_act_window_page/README.md +++ b/web_ir_actions_act_window_page/README.md @@ -22,6 +22,8 @@ A use case could be the case of a validation flow. As a developer, you set up a Usage ===== +See the 'Previous Partner' and 'Next Partner' buttons that this module's demo data adds to the partner form view. + .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot :target: https://runbot.odoo-community.org/runbot/162/10.0 diff --git a/web_ir_actions_act_window_page/__manifest__.py b/web_ir_actions_act_window_page/__manifest__.py index dc4edc9a66d5..f7ead113da45 100644 --- a/web_ir_actions_act_window_page/__manifest__.py +++ b/web_ir_actions_act_window_page/__manifest__.py @@ -14,6 +14,9 @@ 'data': [ 'views/assets.xml', ], + 'demo': [ + 'demo/demo_action.xml', + ], 'installable': True, 'license': 'AGPL-3', 'url': 'https://github.com/oca/web', diff --git a/web_ir_actions_act_window_page/demo/demo_action.xml b/web_ir_actions_act_window_page/demo/demo_action.xml new file mode 100644 index 000000000000..094abbc06b98 --- /dev/null +++ b/web_ir_actions_act_window_page/demo/demo_action.xml @@ -0,0 +1,35 @@ + + + + + Previous partner + + action = {"type": "ir_actions_act_window_page_prev"} + + + + Next partner + + action = {"type": "ir_actions_act_window_page_next"} + + + + + res.partner + + +

+
+ + + + From 2b77f7fb98b981e96f55f10c7e6b10a90af30fc3 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Wed, 17 Jan 2018 10:50:20 +0100 Subject: [PATCH 15/18] OCA Transbot updated translations from Transifex --- web_ir_actions_act_window_page/i18n/de.po | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 web_ir_actions_act_window_page/i18n/de.po diff --git a/web_ir_actions_act_window_page/i18n/de.po b/web_ir_actions_act_window_page/i18n/de.po new file mode 100644 index 000000000000..cafb36ab0d56 --- /dev/null +++ b/web_ir_actions_act_window_page/i18n/de.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_page +# +# Translators: +# Rudolf Schnapka , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-03 03:50+0000\n" +"PO-Revision-Date: 2018-01-03 03:50+0000\n" +"Last-Translator: Rudolf Schnapka , 2018\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: web_ir_actions_act_window_page +#: model:ir.ui.view,arch_db:web_ir_actions_act_window_page.view_partner_form +msgid "Next Partner" +msgstr "Nächster Partner" + +#. module: web_ir_actions_act_window_page +#: model:ir.actions.server,name:web_ir_actions_act_window_page.demo_pager_next +msgid "Next partner" +msgstr "Nächster Partner" + +#. module: web_ir_actions_act_window_page +#: model:ir.ui.view,arch_db:web_ir_actions_act_window_page.view_partner_form +msgid "Previous Partner" +msgstr "Voriger Partner" + +#. module: web_ir_actions_act_window_page +#: model:ir.actions.server,name:web_ir_actions_act_window_page.demo_pager_previous +msgid "Previous partner" +msgstr "Voriger Partner" From 06101b7853e28a9f654a82ffeb0f69688ed1e544 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Sun, 24 Jun 2018 01:39:29 +0000 Subject: [PATCH 16/18] [UPD] Update web_ir_actions_act_window_page.pot --- web_ir_actions_act_window_page/i18n/de.po | 4 +-- .../i18n/web_ir_actions_act_window_page.pot | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 web_ir_actions_act_window_page/i18n/web_ir_actions_act_window_page.pot diff --git a/web_ir_actions_act_window_page/i18n/de.po b/web_ir_actions_act_window_page/i18n/de.po index cafb36ab0d56..d9255cb5385c 100644 --- a/web_ir_actions_act_window_page/i18n/de.po +++ b/web_ir_actions_act_window_page/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_page -# +# # Translators: # Rudolf Schnapka , 2018 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2018-01-03 03:50+0000\n" "Last-Translator: Rudolf Schnapka , 2018\n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: web_ir_actions_act_window_page diff --git a/web_ir_actions_act_window_page/i18n/web_ir_actions_act_window_page.pot b/web_ir_actions_act_window_page/i18n/web_ir_actions_act_window_page.pot new file mode 100644 index 000000000000..f806828722d6 --- /dev/null +++ b/web_ir_actions_act_window_page/i18n/web_ir_actions_act_window_page.pot @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_page +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: web_ir_actions_act_window_page +#: model:ir.ui.view,arch_db:web_ir_actions_act_window_page.view_partner_form +msgid "Next Partner" +msgstr "" + +#. module: web_ir_actions_act_window_page +#: model:ir.actions.server,name:web_ir_actions_act_window_page.demo_pager_next +msgid "Next partner" +msgstr "" + +#. module: web_ir_actions_act_window_page +#: model:ir.ui.view,arch_db:web_ir_actions_act_window_page.view_partner_form +msgid "Previous Partner" +msgstr "" + +#. module: web_ir_actions_act_window_page +#: model:ir.actions.server,name:web_ir_actions_act_window_page.demo_pager_previous +msgid "Previous partner" +msgstr "" + From 766a2fba22aa547fe08a5f32d217c1b394a985a3 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Thu, 15 Jun 2023 13:58:45 +0200 Subject: [PATCH 17/18] [13.0][MIG] web_ir_actions_act_window_page --- .../addons/web_ir_actions_act_window_page | 1 + setup/web_ir_actions_act_window_page/setup.py | 6 + web_ir_actions_act_window_page/README.md | 68 --- web_ir_actions_act_window_page/README.rst | 98 ++++ web_ir_actions_act_window_page/__init__.py | 1 - .../__manifest__.py | 29 +- .../demo/demo_action.xml | 36 +- .../readme/CONTRIBUTORS.rst | 2 + .../readme/DESCRIPTION.rst | 15 + .../readme/USAGE.rst | 2 + .../static/description/index.html | 442 ++++++++++++++++++ .../src/js/web_ir_actions_act_window_page.js | 49 +- .../views/assets.xml | 16 +- 13 files changed, 637 insertions(+), 128 deletions(-) create mode 120000 setup/web_ir_actions_act_window_page/odoo/addons/web_ir_actions_act_window_page create mode 100644 setup/web_ir_actions_act_window_page/setup.py delete mode 100644 web_ir_actions_act_window_page/README.md create mode 100644 web_ir_actions_act_window_page/README.rst create mode 100644 web_ir_actions_act_window_page/readme/CONTRIBUTORS.rst create mode 100644 web_ir_actions_act_window_page/readme/DESCRIPTION.rst create mode 100644 web_ir_actions_act_window_page/readme/USAGE.rst create mode 100644 web_ir_actions_act_window_page/static/description/index.html diff --git a/setup/web_ir_actions_act_window_page/odoo/addons/web_ir_actions_act_window_page b/setup/web_ir_actions_act_window_page/odoo/addons/web_ir_actions_act_window_page new file mode 120000 index 000000000000..f96e80a05cad --- /dev/null +++ b/setup/web_ir_actions_act_window_page/odoo/addons/web_ir_actions_act_window_page @@ -0,0 +1 @@ +../../../../web_ir_actions_act_window_page \ No newline at end of file diff --git a/setup/web_ir_actions_act_window_page/setup.py b/setup/web_ir_actions_act_window_page/setup.py new file mode 100644 index 000000000000..28c57bb64031 --- /dev/null +++ b/setup/web_ir_actions_act_window_page/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/web_ir_actions_act_window_page/README.md b/web_ir_actions_act_window_page/README.md deleted file mode 100644 index 6818c58696bd..000000000000 --- a/web_ir_actions_act_window_page/README.md +++ /dev/null @@ -1,68 +0,0 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: https://www.gnu.org/licenses/agpl - :alt: License: AGPL-3 - -================== -Client side paging -================== - -This addon allows a developer to return the following action types:: - -{'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 on the -client side. - -A use case could be the case of a validation flow. As a developer, you set up a tree view with a domain on records to be validated. The user opens the first record in a form view and validates the record. The validation method returns the 'next' action type so that the browser window of the user is presented with the next record in the form view. - -Usage -===== - -See the 'Previous Partner' and 'Next Partner' buttons that this module's demo data adds to the partner form view. - -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/162/10.0 - -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 smash it by providing detailed and welcomed feedback. - -Credits -======= - -Images ------- - -* Odoo Community Association: `Icon `_. - -Contributors ------------- - -* Holger Brunn -* Stefan Rijnhart - -Do not contact contributors directly about support or help with technical issues. - -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 https://odoo-community.org. diff --git a/web_ir_actions_act_window_page/README.rst b/web_ir_actions_act_window_page/README.rst new file mode 100644 index 000000000000..166357c37a68 --- /dev/null +++ b/web_ir_actions_act_window_page/README.rst @@ -0,0 +1,98 @@ +===================================== +Window actions for client side paging +===================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:6377a2a15c2f7418c0ffb06a0e658928913944755f511c116abbdc64cce831fd + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github + :target: https://github.com/OCA/web/tree/13.0/web_ir_actions_act_window_page + :alt: OCA/web +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_ir_actions_act_window_page + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=13.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This addon allows a developer to return the following action types:: + +{'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 on the client +side. + +A use case could be the case of a validation flow. As a developer, you set up a tree +view with a domain on records to be validated. The user opens the first record in a form +view and validates the record. The validation method returns the 'next' action type so +that the browser window of the user is presented with the next record in the form view. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +See the 'Previous Partner' and 'Next Partner' buttons that this module's demo data adds +to the partner form view. + +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 to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Hunki Enterprises BV +* Therp BV + +Contributors +~~~~~~~~~~~~ + +* Holger Brunn (https://hunki-enterprises.com) +* Stefan Rijnhart (https://opener.amsterdam) + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +This module is part of the `OCA/web `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/web_ir_actions_act_window_page/__init__.py b/web_ir_actions_act_window_page/__init__.py index f69741171a11..1cb6c52ec449 100644 --- a/web_ir_actions_act_window_page/__init__.py +++ b/web_ir_actions_act_window_page/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution diff --git a/web_ir_actions_act_window_page/__manifest__.py b/web_ir_actions_act_window_page/__manifest__.py index f7ead113da45..a4586f9e2e23 100644 --- a/web_ir_actions_act_window_page/__manifest__.py +++ b/web_ir_actions_act_window_page/__manifest__.py @@ -1,23 +1,18 @@ -# coding: utf-8 # © 2013-2015 Therp BV () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) { "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"), - "author": "Therp BV,Odoo Community Association (OCA)", - "version": "10.0.1.0.0", + "summary": ( + "Allows a developer to trigger a pager to show the previous " + "or next next record in the form view" + ), + "author": "Hunki Enterprises BV, Therp BV,Odoo Community Association (OCA)", + "version": "13.0.1.0.0", "category": "Technical", - "depends": [ - 'web', - ], - 'data': [ - 'views/assets.xml', - ], - 'demo': [ - 'demo/demo_action.xml', - ], - 'installable': True, - 'license': 'AGPL-3', - 'url': 'https://github.com/oca/web', + "depends": ["web"], + "data": ["views/assets.xml"], + "demo": ["demo/demo_action.xml"], + "installable": True, + "license": "AGPL-3", + "website": "https://github.com/OCA/web", } diff --git a/web_ir_actions_act_window_page/demo/demo_action.xml b/web_ir_actions_act_window_page/demo/demo_action.xml index 094abbc06b98..7ad1f2c7c2a9 100644 --- a/web_ir_actions_act_window_page/demo/demo_action.xml +++ b/web_ir_actions_act_window_page/demo/demo_action.xml @@ -1,33 +1,41 @@ - + Previous partner - - action = {"type": "ir_actions_act_window_page_prev"} + + code + action = {"type": "ir.actions.act_window.page.prev"} Next partner - - action = {"type": "ir_actions_act_window_page_next"} + + code + action = {"type": "ir.actions.act_window.page.next"} res.partner - +
-
diff --git a/web_ir_actions_act_window_page/readme/CONTRIBUTORS.rst b/web_ir_actions_act_window_page/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000000..94a367e80114 --- /dev/null +++ b/web_ir_actions_act_window_page/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Holger Brunn (https://hunki-enterprises.com) +* Stefan Rijnhart (https://opener.amsterdam) diff --git a/web_ir_actions_act_window_page/readme/DESCRIPTION.rst b/web_ir_actions_act_window_page/readme/DESCRIPTION.rst new file mode 100644 index 000000000000..3f37f2e84b4d --- /dev/null +++ b/web_ir_actions_act_window_page/readme/DESCRIPTION.rst @@ -0,0 +1,15 @@ +This addon allows a developer to return the following action types:: + +{'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 on the client +side. + +A use case could be the case of a validation flow. As a developer, you set up a tree +view with a domain on records to be validated. The user opens the first record in a form +view and validates the record. The validation method returns the 'next' action type so +that the browser window of the user is presented with the next record in the form view. diff --git a/web_ir_actions_act_window_page/readme/USAGE.rst b/web_ir_actions_act_window_page/readme/USAGE.rst new file mode 100644 index 000000000000..0a69dadc6b13 --- /dev/null +++ b/web_ir_actions_act_window_page/readme/USAGE.rst @@ -0,0 +1,2 @@ +See the 'Previous Partner' and 'Next Partner' buttons that this module's demo data adds +to the partner form view. diff --git a/web_ir_actions_act_window_page/static/description/index.html b/web_ir_actions_act_window_page/static/description/index.html new file mode 100644 index 000000000000..f109ad811d99 --- /dev/null +++ b/web_ir_actions_act_window_page/static/description/index.html @@ -0,0 +1,442 @@ + + + + + + +Window actions for client side paging + + + +
+

Window actions for client side paging

+ + +

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runboat

+

This addon allows a developer to return the following action types:

+
+{'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 on the client +side.

+

A use case could be the case of a validation flow. As a developer, you set up a tree +view with a domain on records to be validated. The user opens the first record in a form +view and validates the record. The validation method returns the ‘next’ action type so +that the browser window of the user is presented with the next record in the form view.

+

Table of contents

+ +
+

Usage

+

See the ‘Previous Partner’ and ‘Next Partner’ buttons that this module’s demo data adds +to the partner form view.

+
+
+

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 to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Hunki Enterprises BV
  • +
  • Therp BV
  • +
+
+ +
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

This module is part of the OCA/web project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/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 index b9fbe4fd0f60..d4950207c73c 100644 --- a/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 @@ -1,33 +1,38 @@ -// coding: utf-8 -// © 2013-2015 Therp BV () +// Coding: utf-8 +// (c) 2013-2015 Therp BV () +// (c) 2023 Hunki Enterprises BV () // License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) -odoo.define('web.ir_actions_act_window_page', function(require) { - - var ActionManager = require('web.ActionManager'); +odoo.define("web.ir_actions_act_window_page", function(require) { + "use strict"; + var ActionManager = require("web.ActionManager"); ActionManager.include({ - ir_actions_act_window_page_prev: function(action, options) - { - if(this.inner_widget && this.inner_widget.active_view.type == 'form' && - this.inner_widget.active_view) - { - this.inner_widget.active_view.controller.pager.previous(); + _handleAction: function(action, options) { + if (action.type === "ir.actions.act_window.page.prev") { + return this._executeWindowActionPage(action, options, -1); } - if(options && options.on_close) - { - options.on_close(); + if (action.type === "ir.actions.act_window.page.next") { + return this._executeWindowActionPage(action, options, 1); } + return this._super.apply(this, arguments); }, - ir_actions_act_window_page_next: function(action, options) - { - if(this.inner_widget && this.inner_widget.active_view.type == 'form' && - this.inner_widget.active_view) - { - this.inner_widget.active_view.controller.pager.next(); + _executeWindowActionPage: function(action, options, direction) { + const controller = this.getCurrentController(); + if (controller && controller.widget && controller.widget.pager) { + if ( + this.controllerStack.length > 1 && + controller.widget.pager.state.size === 0 + ) { + // If whatever happened in the button action made the last record inaccessible + // switch back to the tree view + return this._restoreController(this.controllerStack.at(-2)); + } + controller.widget.pager[direction > 0 ? "next" : "previous"](); } - if(options && options.on_close) - { + if (options && options.on_close && options.on_close.name !== "reload") { + // Suppress reloads as the pager does it options.on_close(); } + return Promise.resolve(); }, }); }); diff --git a/web_ir_actions_act_window_page/views/assets.xml b/web_ir_actions_act_window_page/views/assets.xml index f045d63ac603..0febb1e934d2 100644 --- a/web_ir_actions_act_window_page/views/assets.xml +++ b/web_ir_actions_act_window_page/views/assets.xml @@ -1,11 +1,15 @@ - + -