From 90bca25c7fdb004c6f285eb3e723217bf07353dd Mon Sep 17 00:00:00 2001
From: Anthony Muschang
Date: Fri, 27 Feb 2015 00:29:22 +0100
Subject: [PATCH 001/454] [ADD] module web_dialog_size
New module that let the user expand a dialog box to the full screen
width.
---
web_dialog_size/README.rst | 38 ++++++++++++++
web_dialog_size/__init__.py | 0
web_dialog_size/__openerp__.py | 47 ++++++++++++++++++
web_dialog_size/static/description/icon.png | Bin 0 -> 9455 bytes
.../static/src/css/web_dialog_size.css | 17 +++++++
.../static/src/js/web_dialog_size.js | 37 ++++++++++++++
.../static/src/xml/web_dialog_size.xml | 9 ++++
web_dialog_size/view/qweb.xml | 10 ++++
8 files changed, 158 insertions(+)
create mode 100644 web_dialog_size/README.rst
create mode 100644 web_dialog_size/__init__.py
create mode 100644 web_dialog_size/__openerp__.py
create mode 100644 web_dialog_size/static/description/icon.png
create mode 100644 web_dialog_size/static/src/css/web_dialog_size.css
create mode 100644 web_dialog_size/static/src/js/web_dialog_size.js
create mode 100644 web_dialog_size/static/src/xml/web_dialog_size.xml
create mode 100644 web_dialog_size/view/qweb.xml
diff --git a/web_dialog_size/README.rst b/web_dialog_size/README.rst
new file mode 100644
index 000000000000..f508aa0a6563
--- /dev/null
+++ b/web_dialog_size/README.rst
@@ -0,0 +1,38 @@
+Expand Dialog
+=============
+
+A module that lets the user expand a dialog box to the full screen width.
+
+It is named web_dialog_size as it could be extended to propose other dialog size management feature.
+
+
+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
+------------
+
+* Anthony Muschang
+* Stéphane Bidoul
+
+Maintainer
+----------
+
+.. image:: http://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: http://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.
\ No newline at end of file
diff --git a/web_dialog_size/__init__.py b/web_dialog_size/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/web_dialog_size/__openerp__.py b/web_dialog_size/__openerp__.py
new file mode 100644
index 000000000000..f0429370aee8
--- /dev/null
+++ b/web_dialog_size/__openerp__.py
@@ -0,0 +1,47 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# This file is part of web_dialog_sizes, an Odoo module.
+#
+# Copyright (c) 2015 ACSONE SA/NV ()
+#
+# web_expand_dialog 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.
+#
+# web_expand_dialog 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 web_expand_dialog.
+# If not, see .
+#
+##############################################################################
+{
+ 'name': "Web Dialog Size",
+
+ 'summary': """
+ A module that lets the user expand a
+ dialog box to the full screen width.""",
+
+ 'author': "ACSONE SA/NV,Odoo Community Association (OCA)",
+ 'website': "http://acsone.eu",
+
+ 'category': 'web',
+ 'version': '8.0.0.1.0',
+ 'license': 'AGPL-3',
+
+ 'depends': [
+ 'web',
+ ],
+ 'qweb': [
+ 'static/src/xml/web_dialog_size.xml',
+ ],
+ 'data': [
+ 'view/qweb.xml',
+ ],
+}
diff --git a/web_dialog_size/static/description/icon.png b/web_dialog_size/static/description/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d
GIT binary patch
literal 9455
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
z
z?n?eq1XP>p-IM$Z^C;2L3itnbJZAip*Zo0aw2bs8@(s^~*8T9go!%dHcAz2lM;`yp
zD=7&xjFV$S&5uDaiScyD?B-i1ze`+CoRtz`Wn+Zls4&}MO{@N!ufrzjG$B79)Y2d3tBk&)TxUTw@QS0TEL_?njX|@vq?Uz(nBFK5Pq7*xj#u*R&i|?7+6#
z+|r_n#SW&LXhtheZdah{ZVoqwyT{D>MC3nkFF#N)xLi{p7J1jXlmVeb;cP5?e(=f#
zuT7fvjSbjS781v?7{)-X3*?>tq?)Yd)~|1{BDS(pqC
zC}~H#WXlkUW*H5CDOo<)#x7%RY)A;ShGhI5s*#cRDA8YgqG(HeKDx+#(ZQ?386dv!
zlXCO)w91~Vw4AmOcATuV653fa9R$fyK8ul%rG
z-wfS
zihugoZyr38Im?Zuh6@RcF~t1anQu7>#lPpb#}4cOA!EM11`%f*07RqOVkmX{p~KJ9
z^zP;K#|)$`^Rb{rnHGH{~>1(fawV0*Z#)}M`m8-?ZJV<+e}s9wE#
z)l&az?w^5{)`S(%MRzxdNqrs1n*-=jS^_jqE*5XDrA0+VE`5^*p3CuM<&dZEeCjoz
zR;uu_H9ZPZV|fQq`Cyw4nscrVwi!fE6ciMmX$!_hN7uF;jjKG)d2@aC4ropY)8etW=xJvni)8eHi`H$%#zn^WJ5NLc-rqk|u&&4Z6fD_m&JfSI1Bvb?b<*n&sfl0^t
z=HnmRl`XrFvMKB%9}>PaA`m-fK6a0(8=qPkWS5bb4=v?XcWi&hRY?O5HdulRi4?fN
zlsJ*N-0Qw+Yic@s0(2uy%F@ib;GjXt01Fmx5XbRo6+n|pP(&nodMoap^z{~q
ziEeaUT@Mxe3vJSfI6?uLND(CNr=#^W<1b}jzW58bIfyWTDle$mmS(|x-0|2UlX+9k
zQ^EX7Nw}?EzVoBfT(-LT|=9N@^hcn-_p&sqG
z&*oVs2JSU+N4ZD`FhCAWaS;>|wH2G*Id|?pa#@>tyxX`+4HyIArWDvVrX)2WAOQff
z0qyHu&-S@i^MS-+j--!pr4fPBj~_8({~e1bfcl0wI1kaoN>mJL6KUPQm5N7lB(ui1
zE-o%kq)&djzWJ}ob<-GfDlkB;F31j-VHKvQUGQ3sp`CwyGJk_i!y^sD0fqC@$9|jO
zOqN!r!8-p==F@ZVP=U$qSpY(gQ0)59P1&t@y?5rvg<}E+GB}26NYPp4f2YFQrQtot5mn3wu_qprZ=>Ig-$
zbW26Ws~IgY>}^5w`vTB(G`PTZaDiGBo5o(tp)qli|NeV(
z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb
zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4
z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{
zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx}
z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov
zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22
zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq
zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t<
z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k
z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp
z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{}
zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N
Xviia!U7SGha1wx#SCgwmn*{w2TRX*I
literal 0
HcmV?d00001
diff --git a/web_dialog_size/static/src/css/web_dialog_size.css b/web_dialog_size/static/src/css/web_dialog_size.css
new file mode 100644
index 000000000000..10fba0f01009
--- /dev/null
+++ b/web_dialog_size/static/src/css/web_dialog_size.css
@@ -0,0 +1,17 @@
+.modal .modal-header button.dialog_button_extend {
+ padding-top: 0px;
+ padding-right: 3px;
+}
+
+.modal .modal-header button.dialog_button_restore {
+ padding-top: 1px;
+ padding-right: 5px;
+}
+
+.modal .modal-header .dialog_button_hide {
+ display: none;
+}
+
+.dialog_full_screen {
+ width: calc(100% - 50px);
+}
\ No newline at end of file
diff --git a/web_dialog_size/static/src/js/web_dialog_size.js b/web_dialog_size/static/src/js/web_dialog_size.js
new file mode 100644
index 000000000000..d1d0299c8975
--- /dev/null
+++ b/web_dialog_size/static/src/js/web_dialog_size.js
@@ -0,0 +1,37 @@
+openerp.web_dialog_size= function (instance) {
+
+ instance.web.Dialog = instance.web.Dialog.extend({
+
+ init_dialog: function () {
+ var self = this;
+ this._super();
+ self.$dialog_box.find('.dialog_button_restore').addClass('dialog_button_hide');
+ if (this.dialog_options.size !== 'large'){
+ self.$dialog_box.find('.dialog_button_extend').addClass('dialog_button_hide');
+ }
+ else{
+ self.$dialog_box.find('.dialog_button_extend').on('click', self._extending);
+ self.$dialog_box.find('.dialog_button_restore').on('click', self._restore);
+ }
+ },
+
+ _extending: function() {
+ var self = this;
+ $(this).parents('.modal-dialog').addClass('dialog_full_screen');
+ $(this).addClass('dialog_button_hide');
+
+ $(this).parents('.modal-dialog').find('.dialog_button_restore').removeClass('dialog_button_hide')
+ },
+
+ _restore: function() {
+ var self = this;
+ $(this).parents('.modal-dialog').removeClass('dialog_full_screen');
+ $(this).addClass('dialog_button_hide');
+
+ $(this).parents('.modal-dialog').find('.dialog_button_extend').removeClass('dialog_button_hide')
+ },
+
+ });
+
+};
+
diff --git a/web_dialog_size/static/src/xml/web_dialog_size.xml b/web_dialog_size/static/src/xml/web_dialog_size.xml
new file mode 100644
index 000000000000..1808dd2a67f9
--- /dev/null
+++ b/web_dialog_size/static/src/xml/web_dialog_size.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web_dialog_size/view/qweb.xml b/web_dialog_size/view/qweb.xml
new file mode 100644
index 000000000000..31dcd70fe1e8
--- /dev/null
+++ b/web_dialog_size/view/qweb.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From f3df488538a79714aa8cc74997676033703cdddd Mon Sep 17 00:00:00 2001
From: "Pedro M. Baeza"
Date: Wed, 6 Apr 2016 20:33:56 +0200
Subject: [PATCH 002/454] [IMP] web_dialog_size: Select default dialog size by
config
* [IMP] web_dialog_size: Put dialog size expanded by default
* [REM] web_popup_large: By duplication of the functionality
* [IMP] web_dialog_size: README and contributors
* [ADD] configuration parameter for default behavior
[FIX] return super's promise
[IMP] use fontawesome icons for buttons
---
web_dialog_size/README.rst | 27 ++++----
web_dialog_size/__openerp__.py | 5 +-
.../static/src/css/web_dialog_size.css | 14 ++--
.../static/src/js/web_dialog_size.js | 68 +++++++++++++------
.../static/src/xml/web_dialog_size.xml | 11 +--
5 files changed, 77 insertions(+), 48 deletions(-)
diff --git a/web_dialog_size/README.rst b/web_dialog_size/README.rst
index f508aa0a6563..c7e30bf04f15 100644
--- a/web_dialog_size/README.rst
+++ b/web_dialog_size/README.rst
@@ -1,19 +1,16 @@
Expand Dialog
=============
-A module that lets the user expand a dialog box to the full screen width.
+A module that lets the user expand/restore the dialog box size through a button
+in the upper right corner (mimicking most windows managers). By default,
+all dialog boxes are expanded.
-It is named web_dialog_size as it could be extended to propose other dialog size management feature.
-
-
-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 `_.
+Configuration
+=============
+By default, the module respects the caller's `dialog_size` option. If you want
+to override this and have all dialogs maximized by default, set the configuration
+parameter `web_dialog_size.default_maximize` to `1`.
Credits
=======
@@ -23,6 +20,8 @@ Contributors
* Anthony Muschang
* Stéphane Bidoul
+* Pedro M. Baeza
+* Holger Brunn
Maintainer
----------
@@ -33,6 +32,8 @@ Maintainer
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.
+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.
\ No newline at end of file
+To contribute to this module, please visit http://odoo-community.org.
diff --git a/web_dialog_size/__openerp__.py b/web_dialog_size/__openerp__.py
index f0429370aee8..cd7b6a4014e8 100644
--- a/web_dialog_size/__openerp__.py
+++ b/web_dialog_size/__openerp__.py
@@ -28,7 +28,10 @@
A module that lets the user expand a
dialog box to the full screen width.""",
- 'author': "ACSONE SA/NV,Odoo Community Association (OCA)",
+ 'author': "ACSONE SA/NV,"
+ "Serv. Tecnol. Avanzados - Pedro M. Baeza,"
+ "Therp BV,"
+ "Odoo Community Association (OCA)",
'website': "http://acsone.eu",
'category': 'web',
diff --git a/web_dialog_size/static/src/css/web_dialog_size.css b/web_dialog_size/static/src/css/web_dialog_size.css
index 10fba0f01009..74f829ec3790 100644
--- a/web_dialog_size/static/src/css/web_dialog_size.css
+++ b/web_dialog_size/static/src/css/web_dialog_size.css
@@ -1,17 +1,15 @@
.modal .modal-header button.dialog_button_extend {
- padding-top: 0px;
padding-right: 3px;
}
.modal .modal-header button.dialog_button_restore {
- padding-top: 1px;
- padding-right: 5px;
-}
-
-.modal .modal-header .dialog_button_hide {
- display: none;
+ padding-right: 3px;
}
.dialog_full_screen {
width: calc(100% - 50px);
-}
\ No newline at end of file
+}
+
+.modal .modal-header button.close {
+ font-size: 14px;
+}
diff --git a/web_dialog_size/static/src/js/web_dialog_size.js b/web_dialog_size/static/src/js/web_dialog_size.js
index d1d0299c8975..c2d1910c3e98 100644
--- a/web_dialog_size/static/src/js/web_dialog_size.js
+++ b/web_dialog_size/static/src/js/web_dialog_size.js
@@ -1,34 +1,58 @@
openerp.web_dialog_size= function (instance) {
instance.web.Dialog = instance.web.Dialog.extend({
-
init_dialog: function () {
- var self = this;
- this._super();
- self.$dialog_box.find('.dialog_button_restore').addClass('dialog_button_hide');
- if (this.dialog_options.size !== 'large'){
- self.$dialog_box.find('.dialog_button_extend').addClass('dialog_button_hide');
- }
- else{
- self.$dialog_box.find('.dialog_button_extend').on('click', self._extending);
- self.$dialog_box.find('.dialog_button_restore').on('click', self._restore);
+ var self = this,
+ result = this._super();
+ self.$dialog_box.find('.dialog_button_extend')
+ .on('click', self.proxy('_extending'));
+ self.$dialog_box.find('.dialog_button_restore')
+ .on('click', self.proxy('_restore'));
+ if(this.dialog_options.size == 'large')
+ {
+ self._extending();
+ return result;
}
+ return jQuery.when(result).then(function()
+ {
+ var deferred = null;
+ if(openerp.web_dialog_size.default_maximize === undefined)
+ {
+ deferred = (new openerp.web.Model('ir.config_parameter'))
+ .call('get_param',
+ ['web_dialog_size.default_maximize'])
+ .then(function(default_maximize)
+ {
+ openerp.web_dialog_size.default_maximize =
+ default_maximize;
+ });
+ }
+ return jQuery.when(deferred).then(function()
+ {
+ if(openerp.web_dialog_size.default_maximize)
+ {
+ self._extending();
+ }
+ else
+ {
+ self._restore();
+ }
+ });
+ });
},
- _extending: function() {
- var self = this;
- $(this).parents('.modal-dialog').addClass('dialog_full_screen');
- $(this).addClass('dialog_button_hide');
-
- $(this).parents('.modal-dialog').find('.dialog_button_restore').removeClass('dialog_button_hide')
+ _extending: function(e) {
+ var dialog = this.$el.parents('.modal-dialog');
+ dialog.addClass('dialog_full_screen');
+ dialog.find('.dialog_button_extend').hide();
+ dialog.find('.dialog_button_restore').show();
},
- _restore: function() {
- var self = this;
- $(this).parents('.modal-dialog').removeClass('dialog_full_screen');
- $(this).addClass('dialog_button_hide');
-
- $(this).parents('.modal-dialog').find('.dialog_button_extend').removeClass('dialog_button_hide')
+ _restore: function(e) {
+ var dialog = this.$el.parents('.modal-dialog');
+ dialog.removeClass('dialog_full_screen');
+ dialog.find('.dialog_button_restore').hide();
+ dialog.find('.dialog_button_extend').show();
},
});
diff --git a/web_dialog_size/static/src/xml/web_dialog_size.xml b/web_dialog_size/static/src/xml/web_dialog_size.xml
index 1808dd2a67f9..51e6fd6ae581 100644
--- a/web_dialog_size/static/src/xml/web_dialog_size.xml
+++ b/web_dialog_size/static/src/xml/web_dialog_size.xml
@@ -1,9 +1,12 @@
-
-
-
+
+
+
+
+
+
-
\ No newline at end of file
+
From 0c3167dd57e5eb282505f52bba07bae3dcf05b1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Bidoul?=
Date: Fri, 27 May 2016 21:53:29 +0200
Subject: [PATCH 003/454] [FIX] web_dialog_size: do not expand by default and
correctly honor default_maximize parameter
---
web_dialog_size/README.rst | 3 +--
web_dialog_size/static/src/js/web_dialog_size.js | 5 -----
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/web_dialog_size/README.rst b/web_dialog_size/README.rst
index c7e30bf04f15..3d409a60344f 100644
--- a/web_dialog_size/README.rst
+++ b/web_dialog_size/README.rst
@@ -2,8 +2,7 @@ Expand Dialog
=============
A module that lets the user expand/restore the dialog box size through a button
-in the upper right corner (mimicking most windows managers). By default,
-all dialog boxes are expanded.
+in the upper right corner (mimicking most windows managers).
Configuration
=============
diff --git a/web_dialog_size/static/src/js/web_dialog_size.js b/web_dialog_size/static/src/js/web_dialog_size.js
index c2d1910c3e98..ff3708e582f5 100644
--- a/web_dialog_size/static/src/js/web_dialog_size.js
+++ b/web_dialog_size/static/src/js/web_dialog_size.js
@@ -8,11 +8,6 @@ openerp.web_dialog_size= function (instance) {
.on('click', self.proxy('_extending'));
self.$dialog_box.find('.dialog_button_restore')
.on('click', self.proxy('_restore'));
- if(this.dialog_options.size == 'large')
- {
- self._extending();
- return result;
- }
return jQuery.when(result).then(function()
{
var deferred = null;
From 06294991a85c143df3fd78509b8450a4e5b5b731 Mon Sep 17 00:00:00 2001
From: Siddharth Bhalgami
Date: Sun, 12 Jun 2016 16:32:31 +0530
Subject: [PATCH 004/454] [MIG] web_dialog_siza: Migrate to v9.0
---
web_dialog_size/README.rst | 1 +
web_dialog_size/__openerp__.py | 14 +--
.../static/src/css/web_dialog_size.css | 6 +-
.../static/src/js/web_dialog_size.js | 95 ++++++++-----------
web_dialog_size/view/qweb.xml | 19 ++--
5 files changed, 61 insertions(+), 74 deletions(-)
diff --git a/web_dialog_size/README.rst b/web_dialog_size/README.rst
index 3d409a60344f..d30b2f019177 100644
--- a/web_dialog_size/README.rst
+++ b/web_dialog_size/README.rst
@@ -21,6 +21,7 @@ Contributors
* Stéphane Bidoul
* Pedro M. Baeza
* Holger Brunn
+* Siddharth Bhalgami
Maintainer
----------
diff --git a/web_dialog_size/__openerp__.py b/web_dialog_size/__openerp__.py
index cd7b6a4014e8..7c5696f00308 100644
--- a/web_dialog_size/__openerp__.py
+++ b/web_dialog_size/__openerp__.py
@@ -28,14 +28,15 @@
A module that lets the user expand a
dialog box to the full screen width.""",
- 'author': "ACSONE SA/NV,"
- "Serv. Tecnol. Avanzados - Pedro M. Baeza,"
- "Therp BV,"
- "Odoo Community Association (OCA)",
- 'website': "http://acsone.eu",
+ 'author': "ACSONE SA/NV, "
+ "Serv. Tecnol. Avanzados - Pedro M. Baeza, "
+ "Therp BV, "
+ "Odoo Community Association (OCA), "
+ "Siddharth Bhalgami",
+ 'website': "http://acsone.eu",
'category': 'web',
- 'version': '8.0.0.1.0',
+ 'version': '9.0.1.0.0',
'license': 'AGPL-3',
'depends': [
@@ -47,4 +48,5 @@
'data': [
'view/qweb.xml',
],
+ 'installable': True,
}
diff --git a/web_dialog_size/static/src/css/web_dialog_size.css b/web_dialog_size/static/src/css/web_dialog_size.css
index 74f829ec3790..bd7fdb2ee45c 100644
--- a/web_dialog_size/static/src/css/web_dialog_size.css
+++ b/web_dialog_size/static/src/css/web_dialog_size.css
@@ -1,9 +1,9 @@
.modal .modal-header button.dialog_button_extend {
- padding-right: 3px;
+ padding-right: 5px;
}
.modal .modal-header button.dialog_button_restore {
- padding-right: 3px;
+ padding-right: 5px;
}
.dialog_full_screen {
@@ -11,5 +11,5 @@
}
.modal .modal-header button.close {
- font-size: 14px;
+ font-size: 18px;
}
diff --git a/web_dialog_size/static/src/js/web_dialog_size.js b/web_dialog_size/static/src/js/web_dialog_size.js
index ff3708e582f5..56e070f29403 100644
--- a/web_dialog_size/static/src/js/web_dialog_size.js
+++ b/web_dialog_size/static/src/js/web_dialog_size.js
@@ -1,56 +1,41 @@
-openerp.web_dialog_size= function (instance) {
-
- instance.web.Dialog = instance.web.Dialog.extend({
- init_dialog: function () {
- var self = this,
- result = this._super();
- self.$dialog_box.find('.dialog_button_extend')
- .on('click', self.proxy('_extending'));
- self.$dialog_box.find('.dialog_button_restore')
- .on('click', self.proxy('_restore'));
- return jQuery.when(result).then(function()
- {
- var deferred = null;
- if(openerp.web_dialog_size.default_maximize === undefined)
- {
- deferred = (new openerp.web.Model('ir.config_parameter'))
- .call('get_param',
- ['web_dialog_size.default_maximize'])
- .then(function(default_maximize)
- {
- openerp.web_dialog_size.default_maximize =
- default_maximize;
- });
- }
- return jQuery.when(deferred).then(function()
- {
- if(openerp.web_dialog_size.default_maximize)
- {
- self._extending();
- }
- else
- {
- self._restore();
- }
- });
- });
- },
-
- _extending: function(e) {
- var dialog = this.$el.parents('.modal-dialog');
- dialog.addClass('dialog_full_screen');
- dialog.find('.dialog_button_extend').hide();
- dialog.find('.dialog_button_restore').show();
- },
-
- _restore: function(e) {
- var dialog = this.$el.parents('.modal-dialog');
- dialog.removeClass('dialog_full_screen');
- dialog.find('.dialog_button_restore').hide();
- dialog.find('.dialog_button_extend').show();
- },
-
- });
-
-};
+odoo.define('web_dialog_size.web_dialog_size', function (require) {
+'use strict';
+var Model = require('web.DataModel');
+var Dialog = require('web.Dialog');
+
+Dialog.include({
+
+ init: function (parent, options) {
+ var self = this;
+ this._super.apply(this, arguments);
+ self.$modal.find('.dialog_button_extend').on('click', self.proxy('_extending'));
+ self.$modal.find('.dialog_button_restore').on('click', self.proxy('_restore'));
+
+ new Model('ir.config_parameter').query(['key', 'value']).
+ filter([['key', '=', 'web_dialog_size.default_maximize']]).all().then(function(default_maximize) {
+ if (default_maximize.length && default_maximize[0]['value'] == 1) {
+ self._extending();
+ } else {
+ self._restore();
+ }
+ });
+ },
+
+ _extending: function() {
+ var dialog = this.$el.parents('.modal-dialog');
+ dialog.addClass('dialog_full_screen');
+ dialog.find('.dialog_button_extend').hide();
+ dialog.find('.dialog_button_restore').show();
+ },
+
+ _restore: function() {
+ var dialog = this.$el.parents('.modal-dialog');
+ dialog.removeClass('dialog_full_screen');
+ dialog.find('.dialog_button_restore').hide();
+ dialog.find('.dialog_button_extend').show();
+ },
+
+});
+
+});
diff --git a/web_dialog_size/view/qweb.xml b/web_dialog_size/view/qweb.xml
index 31dcd70fe1e8..103b3d970335 100644
--- a/web_dialog_size/view/qweb.xml
+++ b/web_dialog_size/view/qweb.xml
@@ -1,10 +1,9 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
From 5b3313333baa358cd3442ba046d37661bd08c916 Mon Sep 17 00:00:00 2001
From: Siddharth Bhalgami
Date: Sun, 5 Feb 2017 00:15:22 +0530
Subject: [PATCH 005/454] [10.0-MIG] web_dialog_size for v10.0
---
web_dialog_size/__manifest__.py | 33 ++++++++++++
web_dialog_size/__openerp__.py | 52 -------------------
.../static/src/js/web_dialog_size.js | 4 +-
.../{view/qweb.xml => templates/assets.xml} | 0
4 files changed, 35 insertions(+), 54 deletions(-)
create mode 100644 web_dialog_size/__manifest__.py
delete mode 100644 web_dialog_size/__openerp__.py
rename web_dialog_size/{view/qweb.xml => templates/assets.xml} (100%)
diff --git a/web_dialog_size/__manifest__.py b/web_dialog_size/__manifest__.py
new file mode 100644
index 000000000000..10b14d75a6ec
--- /dev/null
+++ b/web_dialog_size/__manifest__.py
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+# Copyright 2015 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+{
+ 'name': "Web Dialog Size",
+
+ 'summary': """
+ A module that lets the user expand a
+ dialog box to the full screen width.""",
+
+ 'author': "ACSONE SA/NV, "
+ "Serv. Tecnol. Avanzados - Pedro M. Baeza, "
+ "Therp BV, "
+ "Odoo Community Association (OCA), "
+ "Siddharth Bhalgami",
+
+ 'website': "http://acsone.eu",
+ 'category': 'web',
+ 'version': '10.0.1.0.0',
+ 'license': 'AGPL-3',
+
+ 'depends': [
+ 'web',
+ ],
+ 'qweb': [
+ 'static/src/xml/web_dialog_size.xml',
+ ],
+ 'data': [
+ 'templates/assets.xml',
+ ],
+ 'installable': True,
+}
diff --git a/web_dialog_size/__openerp__.py b/web_dialog_size/__openerp__.py
deleted file mode 100644
index 7c5696f00308..000000000000
--- a/web_dialog_size/__openerp__.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# This file is part of web_dialog_sizes, an Odoo module.
-#
-# Copyright (c) 2015 ACSONE SA/NV ()
-#
-# web_expand_dialog 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.
-#
-# web_expand_dialog 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 web_expand_dialog.
-# If not, see .
-#
-##############################################################################
-{
- 'name': "Web Dialog Size",
-
- 'summary': """
- A module that lets the user expand a
- dialog box to the full screen width.""",
-
- 'author': "ACSONE SA/NV, "
- "Serv. Tecnol. Avanzados - Pedro M. Baeza, "
- "Therp BV, "
- "Odoo Community Association (OCA), "
- "Siddharth Bhalgami",
-
- 'website': "http://acsone.eu",
- 'category': 'web',
- 'version': '9.0.1.0.0',
- 'license': 'AGPL-3',
-
- 'depends': [
- 'web',
- ],
- 'qweb': [
- 'static/src/xml/web_dialog_size.xml',
- ],
- 'data': [
- 'view/qweb.xml',
- ],
- 'installable': True,
-}
diff --git a/web_dialog_size/static/src/js/web_dialog_size.js b/web_dialog_size/static/src/js/web_dialog_size.js
index 56e070f29403..df56b8fee07c 100644
--- a/web_dialog_size/static/src/js/web_dialog_size.js
+++ b/web_dialog_size/static/src/js/web_dialog_size.js
@@ -23,14 +23,14 @@ Dialog.include({
},
_extending: function() {
- var dialog = this.$el.parents('.modal-dialog');
+ var dialog = this.$modal.find('.modal-dialog');
dialog.addClass('dialog_full_screen');
dialog.find('.dialog_button_extend').hide();
dialog.find('.dialog_button_restore').show();
},
_restore: function() {
- var dialog = this.$el.parents('.modal-dialog');
+ var dialog = this.$modal.find('.modal-dialog');
dialog.removeClass('dialog_full_screen');
dialog.find('.dialog_button_restore').hide();
dialog.find('.dialog_button_extend').show();
diff --git a/web_dialog_size/view/qweb.xml b/web_dialog_size/templates/assets.xml
similarity index 100%
rename from web_dialog_size/view/qweb.xml
rename to web_dialog_size/templates/assets.xml
From 6ed14a651ea84cedf05784ce6f5ff27fcaee3b07 Mon Sep 17 00:00:00 2001
From: Wolfgang Pichler
Date: Mon, 18 Sep 2017 09:58:06 +0200
Subject: [PATCH 006/454] [FIX+IMP] web_dialog_size
* IMP: Added draggable support to dialogs
* FIX: web_dialog_size: export modal
- PR #733 introduced draggable dialogs which broke some of them
---
web_dialog_size/README.rst | 35 ++++++++++++++++---
web_dialog_size/__manifest__.py | 12 +++----
.../static/src/js/web_dialog_size.js | 20 ++++++++++-
3 files changed, 54 insertions(+), 13 deletions(-)
diff --git a/web_dialog_size/README.rst b/web_dialog_size/README.rst
index d30b2f019177..c936a028daba 100644
--- a/web_dialog_size/README.rst
+++ b/web_dialog_size/README.rst
@@ -1,8 +1,14 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: https://www.gnu.org/licenses/agpl
+ :alt: License: AGPL-3
+
+=============
Expand Dialog
=============
A module that lets the user expand/restore the dialog box size through a button
in the upper right corner (mimicking most windows managers).
+It does also add draggable support to the dialogs.
Configuration
=============
@@ -11,24 +17,45 @@ By default, the module respects the caller's `dialog_size` option. If you want
to override this and have all dialogs maximized by default, set the configuration
parameter `web_dialog_size.default_maximize` to `1`.
+.. 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
------------
* Anthony Muschang
* Stéphane Bidoul
-* Pedro M. Baeza
+* Pedro M. Baeza
* Holger Brunn
* Siddharth Bhalgami
+* Wolfgang Pichler
+* David Vidal
+
+Do not contact contributors directly about support or help with technical issues.
Maintainer
----------
-.. image:: http://odoo-community.org/logo.png
+.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
- :target: http://odoo-community.org
+ :target: https://odoo-community.org
This module is maintained by the OCA.
@@ -36,4 +63,4 @@ 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.
+To contribute to this module, please visit https://odoo-community.org.
diff --git a/web_dialog_size/__manifest__.py b/web_dialog_size/__manifest__.py
index 10b14d75a6ec..6b8df22f57a5 100644
--- a/web_dialog_size/__manifest__.py
+++ b/web_dialog_size/__manifest__.py
@@ -4,22 +4,18 @@
{
'name': "Web Dialog Size",
-
'summary': """
A module that lets the user expand a
dialog box to the full screen width.""",
-
'author': "ACSONE SA/NV, "
- "Serv. Tecnol. Avanzados - Pedro M. Baeza, "
"Therp BV, "
- "Odoo Community Association (OCA), "
- "Siddharth Bhalgami",
-
+ "Siddharth Bhalgami,"
+ "Tecnativa, "
+ "Odoo Community Association (OCA)",
'website': "http://acsone.eu",
'category': 'web',
- 'version': '10.0.1.0.0',
+ 'version': '10.0.1.0.1',
'license': 'AGPL-3',
-
'depends': [
'web',
],
diff --git a/web_dialog_size/static/src/js/web_dialog_size.js b/web_dialog_size/static/src/js/web_dialog_size.js
index df56b8fee07c..e8f84da2b13b 100644
--- a/web_dialog_size/static/src/js/web_dialog_size.js
+++ b/web_dialog_size/static/src/js/web_dialog_size.js
@@ -14,7 +14,7 @@ Dialog.include({
new Model('ir.config_parameter').query(['key', 'value']).
filter([['key', '=', 'web_dialog_size.default_maximize']]).all().then(function(default_maximize) {
- if (default_maximize.length && default_maximize[0]['value'] == 1) {
+ if (default_maximize.length && default_maximize[0].value === 1) {
self._extending();
} else {
self._restore();
@@ -22,6 +22,24 @@ Dialog.include({
});
},
+ open: function() {
+ var res = this._super.apply(this, arguments);
+ this.$modal.draggable({
+ handle: '.modal-header',
+ helper: false
+ });
+ return res;
+ },
+
+ close: function() {
+ var draggable = this.$modal.draggable( "instance" );
+ if (draggable) {
+ this.$modal.draggable("destroy");
+ }
+ var res = this._super.apply(this, arguments);
+ return res;
+ },
+
_extending: function() {
var dialog = this.$modal.find('.modal-dialog');
dialog.addClass('dialog_full_screen');
From e5b09e915008b544e0033ca837c5b06f7953c174 Mon Sep 17 00:00:00 2001
From: David
Date: Tue, 19 Dec 2017 20:02:41 +0100
Subject: [PATCH 007/454] [FIX] web_dialog_size: default_maximize
- default_maximize option wasn't working due to strict value comparison
---
web_dialog_size/__manifest__.py | 2 +-
web_dialog_size/static/src/js/web_dialog_size.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/web_dialog_size/__manifest__.py b/web_dialog_size/__manifest__.py
index 6b8df22f57a5..a609e7c35296 100644
--- a/web_dialog_size/__manifest__.py
+++ b/web_dialog_size/__manifest__.py
@@ -14,7 +14,7 @@
"Odoo Community Association (OCA)",
'website': "http://acsone.eu",
'category': 'web',
- 'version': '10.0.1.0.1',
+ 'version': '10.0.1.0.2',
'license': 'AGPL-3',
'depends': [
'web',
diff --git a/web_dialog_size/static/src/js/web_dialog_size.js b/web_dialog_size/static/src/js/web_dialog_size.js
index e8f84da2b13b..f6faa4b10e3c 100644
--- a/web_dialog_size/static/src/js/web_dialog_size.js
+++ b/web_dialog_size/static/src/js/web_dialog_size.js
@@ -14,7 +14,7 @@ Dialog.include({
new Model('ir.config_parameter').query(['key', 'value']).
filter([['key', '=', 'web_dialog_size.default_maximize']]).all().then(function(default_maximize) {
- if (default_maximize.length && default_maximize[0].value === 1) {
+ if (default_maximize.length && default_maximize[0].value == 1) {
self._extending();
} else {
self._restore();
From 1570493f8a8ccb5636ba893485127c955ddf55cf Mon Sep 17 00:00:00 2001
From: Quentin Theuret
Date: Sat, 17 Feb 2018 09:33:41 +0100
Subject: [PATCH 008/454] [MIG] Migrate web_dialog_size module to v11
---
web_dialog_size/README.rst | 3 +-
web_dialog_size/__init__.py | 2 +
web_dialog_size/__manifest__.py | 5 +-
.../static/src/js/web_dialog_size.js | 46 ++++++++++---------
4 files changed, 32 insertions(+), 24 deletions(-)
diff --git a/web_dialog_size/README.rst b/web_dialog_size/README.rst
index c936a028daba..6cc0acf8d72f 100644
--- a/web_dialog_size/README.rst
+++ b/web_dialog_size/README.rst
@@ -19,7 +19,7 @@ parameter `web_dialog_size.default_maximize` to `1`.
.. 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
+ :target: https://runbot.odoo-community.org/runbot/162/11.0
Bug Tracker
===========
@@ -47,6 +47,7 @@ Contributors
* Siddharth Bhalgami
* Wolfgang Pichler
* David Vidal
+* Quentin Theuret
Do not contact contributors directly about support or help with technical issues.
diff --git a/web_dialog_size/__init__.py b/web_dialog_size/__init__.py
index e69de29bb2d1..2b46a37e4370 100644
--- a/web_dialog_size/__init__.py
+++ b/web_dialog_size/__init__.py
@@ -0,0 +1,2 @@
+# Copyright 2018 Quentin Theuret
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
\ No newline at end of file
diff --git a/web_dialog_size/__manifest__.py b/web_dialog_size/__manifest__.py
index a609e7c35296..df8945020b7b 100644
--- a/web_dialog_size/__manifest__.py
+++ b/web_dialog_size/__manifest__.py
@@ -1,5 +1,5 @@
-# -*- coding: utf-8 -*-
# Copyright 2015 ACSONE SA/NV
+# Copyright 2018 Amaris
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
@@ -11,10 +11,11 @@
"Therp BV, "
"Siddharth Bhalgami,"
"Tecnativa, "
+ "Amaris, "
"Odoo Community Association (OCA)",
'website': "http://acsone.eu",
'category': 'web',
- 'version': '10.0.1.0.2',
+ 'version': '11.0.1.0.1',
'license': 'AGPL-3',
'depends': [
'web',
diff --git a/web_dialog_size/static/src/js/web_dialog_size.js b/web_dialog_size/static/src/js/web_dialog_size.js
index f6faa4b10e3c..93056f728131 100644
--- a/web_dialog_size/static/src/js/web_dialog_size.js
+++ b/web_dialog_size/static/src/js/web_dialog_size.js
@@ -1,34 +1,39 @@
odoo.define('web_dialog_size.web_dialog_size', function (require) {
'use strict';
-var Model = require('web.DataModel');
+var rpc = require('web.rpc');
var Dialog = require('web.Dialog');
Dialog.include({
- init: function (parent, options) {
+ willStart: function () {
var self = this;
- this._super.apply(this, arguments);
- self.$modal.find('.dialog_button_extend').on('click', self.proxy('_extending'));
- self.$modal.find('.dialog_button_restore').on('click', self.proxy('_restore'));
-
- new Model('ir.config_parameter').query(['key', 'value']).
- filter([['key', '=', 'web_dialog_size.default_maximize']]).all().then(function(default_maximize) {
- if (default_maximize.length && default_maximize[0].value == 1) {
- self._extending();
- } else {
- self._restore();
- }
+ return this._super.apply(this, arguments).then(function () {
+ self.$modal.find('.dialog_button_extend').on('click', self.proxy('_extending'));
+ self.$modal.find('.dialog_button_restore').on('click', self.proxy('_restore'));
+ return rpc.query({
+ model: 'ir.config_parameter',
+ method: 'get_param',
+ args: ['web_dialog_size.default_maximize',],
+ }).then(function(default_maximize) {
+ if (default_maximize === "True" || default_maximize === 1) {
+ self._extending();
+ } else {
+ self._restore();
+ }
+ });
});
},
open: function() {
- var res = this._super.apply(this, arguments);
- this.$modal.draggable({
- handle: '.modal-header',
- helper: false
- });
- return res;
+ this._super.apply(this, arguments);
+ if (this.$modal) {
+ this.$modal.draggable({
+ handle: '.modal-header',
+ helper: false
+ });
+ };
+ return this;
},
close: function() {
@@ -36,8 +41,7 @@ Dialog.include({
if (draggable) {
this.$modal.draggable("destroy");
}
- var res = this._super.apply(this, arguments);
- return res;
+ return this._super.apply(this, arguments);
},
_extending: function() {
From f8e9147fca9bf8ea81a1a3984a3254b1b8acccf2 Mon Sep 17 00:00:00 2001
From: Quentin THEURET
Date: Tue, 15 May 2018 20:42:14 +0200
Subject: [PATCH 009/454] [FIX] #921 Fixed issue when discard a modal with
draggable element
---
web_dialog_size/__manifest__.py | 2 +-
web_dialog_size/static/src/js/web_dialog_size.js | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/web_dialog_size/__manifest__.py b/web_dialog_size/__manifest__.py
index df8945020b7b..3b032fe7f5b8 100644
--- a/web_dialog_size/__manifest__.py
+++ b/web_dialog_size/__manifest__.py
@@ -15,7 +15,7 @@
"Odoo Community Association (OCA)",
'website': "http://acsone.eu",
'category': 'web',
- 'version': '11.0.1.0.1',
+ 'version': '11.0.1.0.2',
'license': 'AGPL-3',
'depends': [
'web',
diff --git a/web_dialog_size/static/src/js/web_dialog_size.js b/web_dialog_size/static/src/js/web_dialog_size.js
index 93056f728131..4aa412f4b6ea 100644
--- a/web_dialog_size/static/src/js/web_dialog_size.js
+++ b/web_dialog_size/static/src/js/web_dialog_size.js
@@ -37,9 +37,11 @@ Dialog.include({
},
close: function() {
- var draggable = this.$modal.draggable( "instance" );
- if (draggable) {
- this.$modal.draggable("destroy");
+ if (this.$modal) {
+ var draggable = this.$modal.draggable("instance");
+ if (draggable) {
+ this.$modal.draggable("destroy");
+ }
}
return this._super.apply(this, arguments);
},
From 40ced2ddf32e4e2cbd34b3489560455b9b04b278 Mon Sep 17 00:00:00 2001
From: Jairo Llopis
Date: Wed, 13 Jun 2018 08:54:46 +0200
Subject: [PATCH 010/454] [FIX] web_dialog_size: Fix usage for non-admins and
reduce calls (#954)
This addon had 2 problems after migrating to v11:
1. One call to backend's `ir.config_parameter.get_param` was done for
each instantiated dialog, while the setting served for the whole
session equally.
2. That model is now readable only by admin users, so non-admins
couldn't use the default at all.
Fixed now.
---
web_dialog_size/README.rst | 88 ++--
web_dialog_size/__init__.py | 3 +-
web_dialog_size/__manifest__.py | 4 +-
web_dialog_size/i18n/web_dialog_size.pot | 20 +
web_dialog_size/models/__init__.py | 1 +
web_dialog_size/models/ir_config_parameter.py | 17 +
web_dialog_size/readme/CONFIGURATION.rst | 3 +
web_dialog_size/readme/CONTRIBUTORS.rst | 11 +
web_dialog_size/readme/DESCRIPTION.rst | 3 +
web_dialog_size/static/description/index.html | 436 ++++++++++++++++++
.../static/src/js/web_dialog_size.js | 15 +-
11 files changed, 557 insertions(+), 44 deletions(-)
create mode 100644 web_dialog_size/i18n/web_dialog_size.pot
create mode 100644 web_dialog_size/models/__init__.py
create mode 100644 web_dialog_size/models/ir_config_parameter.py
create mode 100644 web_dialog_size/readme/CONFIGURATION.rst
create mode 100644 web_dialog_size/readme/CONTRIBUTORS.rst
create mode 100644 web_dialog_size/readme/DESCRIPTION.rst
create mode 100644 web_dialog_size/static/description/index.html
diff --git a/web_dialog_size/README.rst b/web_dialog_size/README.rst
index 6cc0acf8d72f..440f06333c29 100644
--- a/web_dialog_size/README.rst
+++ b/web_dialog_size/README.rst
@@ -1,67 +1,89 @@
-.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
- :target: https://www.gnu.org/licenses/agpl
- :alt: License: AGPL-3
-
-=============
-Expand Dialog
-=============
+===============
+Web Dialog Size
+===============
+
+.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! This file is generated by oca-gen-addon-readme !!
+ !! changes will be overwritten. !!
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+.. |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/11.0/web_dialog_size
+ :alt: OCA/web
+.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
+ :target: https://translation.odoo-community.org/projects/web-11-0/web-11-0-web_dialog_size
+ :alt: Translate me on Weblate
+.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
+ :target: https://runbot.odoo-community.org/runbot/162/11.0
+ :alt: Try me on Runbot
+
+|badge1| |badge2| |badge3| |badge4| |badge5|
A module that lets the user expand/restore the dialog box size through a button
-in the upper right corner (mimicking most windows managers).
-It does also add draggable support to the dialogs.
-
-Configuration
-=============
+in the upper right corner (imitating most windows managers).
+It also adds draggable support to the dialogs.
-By default, the module respects the caller's `dialog_size` option. If you want
-to override this and have all dialogs maximized by default, set the configuration
-parameter `web_dialog_size.default_maximize` to `1`.
+**Table of contents**
-.. 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/11.0
+.. contents::
+ :local:
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.
+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 `_.
+
+Do not contact contributors directly about support or help with technical issues.
Credits
=======
-Images
-------
+Authors
+~~~~~~~
-* Odoo Community Association: `Icon `_.
+* ACSONE SA/NV
+* Therp BV
+* Siddharth Bhalgami
+* Tecnativa
+* Amaris
Contributors
-------------
+~~~~~~~~~~~~
* Anthony Muschang
* Stéphane Bidoul
-* Pedro M. Baeza
* Holger Brunn
* Siddharth Bhalgami
* Wolfgang Pichler
* David Vidal
* Quentin Theuret
+* `Tecnativa `_:
-Do not contact contributors directly about support or help with technical issues.
+ * Pedro M. Baeza
+ * Jairo Llopis
-Maintainer
-----------
+Maintainers
+~~~~~~~~~~~
+
+This module is maintained by the OCA.
.. 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.
+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_dialog_size/__init__.py b/web_dialog_size/__init__.py
index 2b46a37e4370..0650744f6bc6 100644
--- a/web_dialog_size/__init__.py
+++ b/web_dialog_size/__init__.py
@@ -1,2 +1 @@
-# Copyright 2018 Quentin Theuret
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
\ No newline at end of file
+from . import models
diff --git a/web_dialog_size/__manifest__.py b/web_dialog_size/__manifest__.py
index 3b032fe7f5b8..4e799d1a5f42 100644
--- a/web_dialog_size/__manifest__.py
+++ b/web_dialog_size/__manifest__.py
@@ -13,9 +13,9 @@
"Tecnativa, "
"Amaris, "
"Odoo Community Association (OCA)",
- 'website': "http://acsone.eu",
+ 'website': "http://github.com/OCA/web",
'category': 'web',
- 'version': '11.0.1.0.2',
+ 'version': '11.0.1.0.3',
'license': 'AGPL-3',
'depends': [
'web',
diff --git a/web_dialog_size/i18n/web_dialog_size.pot b/web_dialog_size/i18n/web_dialog_size.pot
new file mode 100644
index 000000000000..ab1f7385cd1d
--- /dev/null
+++ b/web_dialog_size/i18n/web_dialog_size.pot
@@ -0,0 +1,20 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_dialog_size
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.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_dialog_size
+#: model:ir.model,name:web_dialog_size.model_ir_config_parameter
+msgid "ir.config_parameter"
+msgstr ""
+
diff --git a/web_dialog_size/models/__init__.py b/web_dialog_size/models/__init__.py
new file mode 100644
index 000000000000..bd3aa9f10636
--- /dev/null
+++ b/web_dialog_size/models/__init__.py
@@ -0,0 +1 @@
+from . import ir_config_parameter
diff --git a/web_dialog_size/models/ir_config_parameter.py b/web_dialog_size/models/ir_config_parameter.py
new file mode 100644
index 000000000000..bc916db00fad
--- /dev/null
+++ b/web_dialog_size/models/ir_config_parameter.py
@@ -0,0 +1,17 @@
+# Copyright 2018 Tecnativa - Jairo Llopis
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
+
+from odoo.models import api, Model
+from odoo.tools.safe_eval import const_eval
+
+
+class IrConfigParameter(Model):
+ _inherit = "ir.config_parameter"
+
+ @api.model
+ def get_web_dialog_size_config(self):
+ get_param = self.sudo().get_param
+ return {
+ key: const_eval(get_param("web_dialog_size.%s" % key, "False"))
+ for key in ["default_maximize"]
+ }
diff --git a/web_dialog_size/readme/CONFIGURATION.rst b/web_dialog_size/readme/CONFIGURATION.rst
new file mode 100644
index 000000000000..18b1ad078609
--- /dev/null
+++ b/web_dialog_size/readme/CONFIGURATION.rst
@@ -0,0 +1,3 @@
+By default, the module respects the caller's ``dialog_size`` option.
+If you want to override this and have all dialogs maximized by default,
+set the configuration parameter ``web_dialog_size.default_maximize`` to ``1``.
diff --git a/web_dialog_size/readme/CONTRIBUTORS.rst b/web_dialog_size/readme/CONTRIBUTORS.rst
new file mode 100644
index 000000000000..0641b1d1e15e
--- /dev/null
+++ b/web_dialog_size/readme/CONTRIBUTORS.rst
@@ -0,0 +1,11 @@
+* Anthony Muschang
+* Stéphane Bidoul
+* Holger Brunn
+* Siddharth Bhalgami
+* Wolfgang Pichler
+* David Vidal
+* Quentin Theuret
+* `Tecnativa `_:
+
+ * Pedro M. Baeza
+ * Jairo Llopis
diff --git a/web_dialog_size/readme/DESCRIPTION.rst b/web_dialog_size/readme/DESCRIPTION.rst
new file mode 100644
index 000000000000..398e72f50cc7
--- /dev/null
+++ b/web_dialog_size/readme/DESCRIPTION.rst
@@ -0,0 +1,3 @@
+A module that lets the user expand/restore the dialog box size through a button
+in the upper right corner (imitating most windows managers).
+It also adds draggable support to the dialogs.
diff --git a/web_dialog_size/static/description/index.html b/web_dialog_size/static/description/index.html
new file mode 100644
index 000000000000..ce5afa5608e1
--- /dev/null
+++ b/web_dialog_size/static/description/index.html
@@ -0,0 +1,436 @@
+
+
+
+
+
+
+Web Dialog Size
+
+
+
+
+
Web Dialog Size
+
+
+
+
A module that lets the user expand/restore the dialog box size through a button
+in the upper right corner (imitating most windows managers).
+It also adds draggable support to the dialogs.
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.
+
Do not contact contributors directly about support or help with technical issues.
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.
+
+
diff --git a/web_dialog_size/static/src/js/web_dialog_size.js b/web_dialog_size/static/src/js/web_dialog_size.js
index 4aa412f4b6ea..4ec9424645ae 100644
--- a/web_dialog_size/static/src/js/web_dialog_size.js
+++ b/web_dialog_size/static/src/js/web_dialog_size.js
@@ -4,6 +4,11 @@ odoo.define('web_dialog_size.web_dialog_size', function (require) {
var rpc = require('web.rpc');
var Dialog = require('web.Dialog');
+var config = rpc.query({
+ model: 'ir.config_parameter',
+ method: 'get_web_dialog_size_config',
+});
+
Dialog.include({
willStart: function () {
@@ -11,12 +16,8 @@ Dialog.include({
return this._super.apply(this, arguments).then(function () {
self.$modal.find('.dialog_button_extend').on('click', self.proxy('_extending'));
self.$modal.find('.dialog_button_restore').on('click', self.proxy('_restore'));
- return rpc.query({
- model: 'ir.config_parameter',
- method: 'get_param',
- args: ['web_dialog_size.default_maximize',],
- }).then(function(default_maximize) {
- if (default_maximize === "True" || default_maximize === 1) {
+ return config.done(function(default_maximize) {
+ if (default_maximize) {
self._extending();
} else {
self._restore();
@@ -32,7 +33,7 @@ Dialog.include({
handle: '.modal-header',
helper: false
});
- };
+ }
return this;
},
From 2a53454440aaaec8552654c7ca49cd7b72f959b2 Mon Sep 17 00:00:00 2001
From: QS5ELkMu
Date: Wed, 18 Jul 2018 12:45:50 +0200
Subject: [PATCH 011/454] [11.0][FIX] web_dialog_size: Draggable Dialog
---
.../static/src/js/web_dialog_size.js | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/web_dialog_size/static/src/js/web_dialog_size.js b/web_dialog_size/static/src/js/web_dialog_size.js
index 4ec9424645ae..c5b281a048ed 100644
--- a/web_dialog_size/static/src/js/web_dialog_size.js
+++ b/web_dialog_size/static/src/js/web_dialog_size.js
@@ -26,15 +26,15 @@ Dialog.include({
});
},
- open: function() {
- this._super.apply(this, arguments);
- if (this.$modal) {
- this.$modal.draggable({
- handle: '.modal-header',
- helper: false
- });
- }
- return this;
+ opened: function(handler) {
+ return this._super.apply(this, arguments).then(function(){
+ if (this.$modal) {
+ this.$modal.draggable({
+ handle: '.modal-header',
+ helper: false
+ });
+ }
+ }.bind(this));
},
close: function() {
From 84b5dc1b3f928f8e125857751fac881c8db0a251 Mon Sep 17 00:00:00 2001
From: joezsweet
Date: Fri, 21 Sep 2018 17:24:51 +0200
Subject: [PATCH 012/454] Fix default_maximize check
Checking result of rpc call, `dialog_maximize`, will end to be always `true` as the method will return a json: `{'dialog_maximize': false }`. So i changed the test to test the value of json key `dialog_maximize`
---
web_dialog_size/static/src/js/web_dialog_size.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/web_dialog_size/static/src/js/web_dialog_size.js b/web_dialog_size/static/src/js/web_dialog_size.js
index c5b281a048ed..7c5ab7c5bb5c 100644
--- a/web_dialog_size/static/src/js/web_dialog_size.js
+++ b/web_dialog_size/static/src/js/web_dialog_size.js
@@ -16,8 +16,8 @@ Dialog.include({
return this._super.apply(this, arguments).then(function () {
self.$modal.find('.dialog_button_extend').on('click', self.proxy('_extending'));
self.$modal.find('.dialog_button_restore').on('click', self.proxy('_restore'));
- return config.done(function(default_maximize) {
- if (default_maximize) {
+ return config.done(function(r) {
+ if (r.default_maximize) {
self._extending();
} else {
self._restore();
From e7680d9e87229ce42b568adcdfbf1dc7c9c17323 Mon Sep 17 00:00:00 2001
From: ernesto
Date: Wed, 21 Nov 2018 22:50:59 -0500
Subject: [PATCH 013/454] [MIG] web_dialog_size: Migration to 12.0
---
web_dialog_size/README.rst | 24 +++++++---
web_dialog_size/__manifest__.py | 2 +-
web_dialog_size/i18n/web_dialog_size.pot | 4 +-
web_dialog_size/models/ir_config_parameter.py | 4 +-
web_dialog_size/readme/CONFIGURE.rst | 5 ++
web_dialog_size/readme/CONTRIBUTORS.rst | 5 +-
web_dialog_size/static/description/index.html | 46 ++++++++++++-------
.../static/src/css/web_dialog_size.css | 15 ------
.../static/src/scss/web_dialog_size.scss | 24 ++++++++++
.../static/src/xml/web_dialog_size.xml | 2 +-
web_dialog_size/templates/assets.xml | 2 +-
web_dialog_size/tests/__init__.py | 1 +
web_dialog_size/tests/test_web_dialog_size.py | 20 ++++++++
13 files changed, 107 insertions(+), 47 deletions(-)
create mode 100644 web_dialog_size/readme/CONFIGURE.rst
delete mode 100644 web_dialog_size/static/src/css/web_dialog_size.css
create mode 100644 web_dialog_size/static/src/scss/web_dialog_size.scss
create mode 100644 web_dialog_size/tests/__init__.py
create mode 100644 web_dialog_size/tests/test_web_dialog_size.py
diff --git a/web_dialog_size/README.rst b/web_dialog_size/README.rst
index 440f06333c29..ee62e1816e95 100644
--- a/web_dialog_size/README.rst
+++ b/web_dialog_size/README.rst
@@ -14,13 +14,13 @@ Web Dialog Size
: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/11.0/web_dialog_size
+ :target: https://github.com/OCA/web/tree/12.0/web_dialog_size
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/web-11-0/web-11-0-web_dialog_size
+ :target: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_dialog_size
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/162/11.0
+ :target: https://runbot.odoo-community.org/runbot/162/12.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -34,13 +34,22 @@ It also adds draggable support to the dialogs.
.. contents::
:local:
+Configuration
+=============
+
+If you want to set dialog boxes maximized by default, you need to:
+
+#. Go to *Settings -> Technical -> Parameters -> System Parameters*
+#. Add a new record with the text *web_dialog_size.default_maximize* in
+ the *Key* field and the text *True* in the *Value* field
+
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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -68,8 +77,9 @@ Contributors
* Quentin Theuret
* `Tecnativa `_:
- * Pedro M. Baeza
- * Jairo Llopis
+ * Pedro M. Baeza
+ * Jairo Llopis
+ * Ernesto Tejeda
Maintainers
~~~~~~~~~~~
@@ -84,6 +94,6 @@ 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.
+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_dialog_size/__manifest__.py b/web_dialog_size/__manifest__.py
index 4e799d1a5f42..31f85ac95eb3 100644
--- a/web_dialog_size/__manifest__.py
+++ b/web_dialog_size/__manifest__.py
@@ -15,7 +15,7 @@
"Odoo Community Association (OCA)",
'website': "http://github.com/OCA/web",
'category': 'web',
- 'version': '11.0.1.0.3',
+ 'version': '12.0.1.0.0',
'license': 'AGPL-3',
'depends': [
'web',
diff --git a/web_dialog_size/i18n/web_dialog_size.pot b/web_dialog_size/i18n/web_dialog_size.pot
index ab1f7385cd1d..513879ed357e 100644
--- a/web_dialog_size/i18n/web_dialog_size.pot
+++ b/web_dialog_size/i18n/web_dialog_size.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 11.0\n"
+"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
@@ -15,6 +15,6 @@ msgstr ""
#. module: web_dialog_size
#: model:ir.model,name:web_dialog_size.model_ir_config_parameter
-msgid "ir.config_parameter"
+msgid "System Parameter"
msgstr ""
diff --git a/web_dialog_size/models/ir_config_parameter.py b/web_dialog_size/models/ir_config_parameter.py
index bc916db00fad..4de06e322c4e 100644
--- a/web_dialog_size/models/ir_config_parameter.py
+++ b/web_dialog_size/models/ir_config_parameter.py
@@ -12,6 +12,6 @@ class IrConfigParameter(Model):
def get_web_dialog_size_config(self):
get_param = self.sudo().get_param
return {
- key: const_eval(get_param("web_dialog_size.%s" % key, "False"))
- for key in ["default_maximize"]
+ "default_maximize": const_eval(
+ get_param("web_dialog_size.default_maximize", "False"))
}
diff --git a/web_dialog_size/readme/CONFIGURE.rst b/web_dialog_size/readme/CONFIGURE.rst
new file mode 100644
index 000000000000..902f3316e49a
--- /dev/null
+++ b/web_dialog_size/readme/CONFIGURE.rst
@@ -0,0 +1,5 @@
+If you want to set dialog boxes maximized by default, you need to:
+
+#. Go to *Settings -> Technical -> Parameters -> System Parameters*
+#. Add a new record with the text *web_dialog_size.default_maximize* in
+ the *Key* field and the text *True* in the *Value* field
diff --git a/web_dialog_size/readme/CONTRIBUTORS.rst b/web_dialog_size/readme/CONTRIBUTORS.rst
index 0641b1d1e15e..e78168e415bf 100644
--- a/web_dialog_size/readme/CONTRIBUTORS.rst
+++ b/web_dialog_size/readme/CONTRIBUTORS.rst
@@ -7,5 +7,6 @@
* Quentin Theuret
* `Tecnativa `_:
- * Pedro M. Baeza
- * Jairo Llopis
+ * Pedro M. Baeza
+ * Jairo Llopis
+ * Ernesto Tejeda
diff --git a/web_dialog_size/static/description/index.html b/web_dialog_size/static/description/index.html
index ce5afa5608e1..b35dab812deb 100644
--- a/web_dialog_size/static/description/index.html
+++ b/web_dialog_size/static/description/index.html
@@ -3,7 +3,7 @@
-
+
Web Dialog Size
+
+
+
+
Calendar slot duration
+
+
+
+
This module extends the functionality of backend calendars to support custom
+slot durations and to allow you to provide more specific UX regarding event
+duration and snapping.
If you want to configure your calendar viewΓÇÖs snap duration, make sure that you
+action includes a context similar to this (example is the default value):
+
+{"calendar_slot_duration": "00:30:00"}
+
+
It can be added in actions defined on python or as ir.actions.act_window
+records.
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.
+
Do not contact contributors directly about support or help with technical issues.
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.
+
+
diff --git a/web_calendar_slot_duration/static/src/js/calendar_model.js b/web_calendar_slot_duration/static/src/js/calendar_model.js
new file mode 100644
index 000000000000..e4fd434a35db
--- /dev/null
+++ b/web_calendar_slot_duration/static/src/js/calendar_model.js
@@ -0,0 +1,22 @@
+/* Copyright 2021 Tecnativa - Jairo Llopis
+ * License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */
+
+odoo.define("web_calendar_slot_duration.CalendarModel", function (require) {
+ "use strict";
+
+ var CalendarModel = require("web.CalendarModel");
+
+ CalendarModel.include({
+ /**
+ * @override
+ */
+ _getFullCalendarOptions: function () {
+ var result = this._super.call(this, arguments);
+ result.slotDuration =
+ this.data.context.calendar_slot_duration ||
+ result.slotDuration ||
+ "00:30:00";
+ return result;
+ },
+ });
+});
diff --git a/web_calendar_slot_duration/templates/assets.xml b/web_calendar_slot_duration/templates/assets.xml
new file mode 100644
index 000000000000..74b6b5cd8e01
--- /dev/null
+++ b/web_calendar_slot_duration/templates/assets.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
From f21fd1dbeaaa8ed2abda97801c2089333dbfe62c Mon Sep 17 00:00:00 2001
From: Marcel Savegnago
Date: Mon, 15 Mar 2021 03:51:02 +0000
Subject: [PATCH 040/454] Added translation using Weblate (Portuguese (Brazil))
---
web_calendar_slot_duration/i18n/pt_BR.po | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 web_calendar_slot_duration/i18n/pt_BR.po
diff --git a/web_calendar_slot_duration/i18n/pt_BR.po b/web_calendar_slot_duration/i18n/pt_BR.po
new file mode 100644
index 000000000000..7971f5f93e54
--- /dev/null
+++ b/web_calendar_slot_duration/i18n/pt_BR.po
@@ -0,0 +1,14 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 12.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=2; plural=n > 1;\n"
From b6b63343f07ba366f7e94ddbd286b1030a6f80d2 Mon Sep 17 00:00:00 2001
From: Maria Sparenberg
Date: Tue, 6 Apr 2021 06:52:03 +0000
Subject: [PATCH 041/454] Added translation using Weblate (German)
---
web_calendar_slot_duration/i18n/de.po | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 web_calendar_slot_duration/i18n/de.po
diff --git a/web_calendar_slot_duration/i18n/de.po b/web_calendar_slot_duration/i18n/de.po
new file mode 100644
index 000000000000..d675667da8a6
--- /dev/null
+++ b/web_calendar_slot_duration/i18n/de.po
@@ -0,0 +1,14 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 12.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
From 19cd61db75cdac4914eb6946c4afccb264fd5fab Mon Sep 17 00:00:00 2001
From: Jairo Llopis
Date: Tue, 13 Jul 2021 12:15:26 +0100
Subject: [PATCH 042/454] [MIG] web_calendar_slot_duration: migration to 13.0
Most normal migration ever.
@Tecnativa TT30987
[UPD] Update web_calendar_slot_duration.pot
[UPD] README.rst
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: web-13.0/web-13.0-web_calendar_slot_duration
Translate-URL: https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_calendar_slot_duration/
---
web_calendar_slot_duration/README.rst | 10 +++++-----
web_calendar_slot_duration/__manifest__.py | 6 ++----
web_calendar_slot_duration/i18n/de.po | 14 --------------
.../i18n/web_calendar_slot_duration.pot | 5 ++---
.../static/description/index.html | 6 +++---
.../static/src/js/calendar_model.js | 4 ++--
web_calendar_slot_duration/templates/assets.xml | 8 +++++---
7 files changed, 19 insertions(+), 34 deletions(-)
diff --git a/web_calendar_slot_duration/README.rst b/web_calendar_slot_duration/README.rst
index c0e8e686de46..0aed5acbe0ec 100644
--- a/web_calendar_slot_duration/README.rst
+++ b/web_calendar_slot_duration/README.rst
@@ -14,13 +14,13 @@ Calendar slot duration
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
- :target: https://github.com/OCA/web/tree/12.0/web_calendar_slot_duration
+ :target: https://github.com/OCA/web/tree/13.0/web_calendar_slot_duration
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_calendar_slot_duration
+ :target: https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_calendar_slot_duration
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/162/12.0
+ :target: https://runbot.odoo-community.org/runbot/162/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -64,7 +64,7 @@ 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -97,6 +97,6 @@ Current `maintainer `__:
|maintainer-Yajo|
-This module is part of the `OCA/web `_ project on GitHub.
+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_calendar_slot_duration/__manifest__.py b/web_calendar_slot_duration/__manifest__.py
index 40d1ca107d8d..4fa0686e697f 100644
--- a/web_calendar_slot_duration/__manifest__.py
+++ b/web_calendar_slot_duration/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Calendar slot duration",
"summary": "Customizable calendar slot durations",
- "version": "12.0.1.0.0",
+ "version": "13.0.1.0.0",
"development_status": "Production/Stable",
"category": "Extra Tools",
"website": "https://github.com/OCA/web",
@@ -13,7 +13,5 @@
"application": False,
"installable": True,
"depends": ["web"],
- "data": [
- "templates/assets.xml",
- ],
+ "data": ["templates/assets.xml"],
}
diff --git a/web_calendar_slot_duration/i18n/de.po b/web_calendar_slot_duration/i18n/de.po
index d675667da8a6..e69de29bb2d1 100644
--- a/web_calendar_slot_duration/i18n/de.po
+++ b/web_calendar_slot_duration/i18n/de.po
@@ -1,14 +0,0 @@
-# Translation of Odoo Server.
-# This file contains the translation of the following modules:
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Odoo Server 12.0\n"
-"Report-Msgid-Bugs-To: \n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
-"Language: de\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
diff --git a/web_calendar_slot_duration/i18n/web_calendar_slot_duration.pot b/web_calendar_slot_duration/i18n/web_calendar_slot_duration.pot
index d2e396f159e1..cc93d01ee547 100644
--- a/web_calendar_slot_duration/i18n/web_calendar_slot_duration.pot
+++ b/web_calendar_slot_duration/i18n/web_calendar_slot_duration.pot
@@ -3,12 +3,11 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 12.0\n"
+"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: <>\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"
-
diff --git a/web_calendar_slot_duration/static/description/index.html b/web_calendar_slot_duration/static/description/index.html
index 458ab9fef45f..2e2b0a1dfc1f 100644
--- a/web_calendar_slot_duration/static/description/index.html
+++ b/web_calendar_slot_duration/static/description/index.html
@@ -367,7 +367,7 @@
Calendar slot duration
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module extends the functionality of backend calendars to support custom
slot durations and to allow you to provide more specific UX regarding event
duration and snapping.
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.
This module extends the functionality of backend calendars to support
custom slot durations and to allow you to provide more specific UX
regarding event duration and snapping.
If you want to configure your calendar view’s snap duration, make sure
that your window action includes a context similar to this (example is
@@ -399,40 +404,40 @@
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.
',
{
text: action.message,
+ css: {
+ 'white-space': 'pre-line',
+ }
}
),
buttons: buttons.concat(
From 6e4d796be69e466b4c9e36b016fede2fa90518ae Mon Sep 17 00:00:00 2001
From: Benjamin Willig
Date: Tue, 23 May 2017 17:25:01 +0200
Subject: [PATCH 074/454] [MIG] web_ir_actions_act_window_message: Migration to
10. Also added HTML handling
---
web_ir_actions_act_window_message/README.rst | 5 +++-
.../__manifest__.py | 2 +-
.../js/web_ir_actions_act_window_message.js | 26 ++++++++++++-------
3 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/web_ir_actions_act_window_message/README.rst b/web_ir_actions_act_window_message/README.rst
index 4a64a92ed4e6..3772ad3e7bb8 100644
--- a/web_ir_actions_act_window_message/README.rst
+++ b/web_ir_actions_act_window_message/README.rst
@@ -19,6 +19,8 @@ Depend on this module and return
# you can create your own close button with an action of type
# ir.actions.act_window_close
'close_button_title': 'Make this window go away',
+ # Use HTML instead of text
+ 'is_html_message': True,
# this is an optional list of buttons to show
'buttons': [
# a button can be any action (also ir.actions.report.xml et al)
@@ -73,6 +75,7 @@ Contributors
* Holger Brunn
* Zakaria Makrelouf (ACSONE SA/NV)
+* Benjamin Willig (ACSONE SA/NV)
Maintainer
----------
@@ -85,4 +88,4 @@ 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.
+To contribute to this module, please visit http://odoo-community.org.
\ No newline at end of file
diff --git a/web_ir_actions_act_window_message/__manifest__.py b/web_ir_actions_act_window_message/__manifest__.py
index 9a8bdcc1d2d5..5dd3b18b13a2 100644
--- a/web_ir_actions_act_window_message/__manifest__.py
+++ b/web_ir_actions_act_window_message/__manifest__.py
@@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Client side message boxes",
- "version": "9.0.1.0.0",
+ "version": "10.0.1.0.0",
"author": "Therp BV, "
"ACSONE SA/NV, "
"Odoo Community Association (OCA)",
diff --git a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js
index 4ea153d4882e..1b0708d719be 100644
--- a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js
+++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js
@@ -7,7 +7,6 @@ odoo.define('web.web_ir_actions_act_window_message', function(require)
var ActionManager = require('web.ActionManager'),
core = require('web.core'),
- _ = require('_'),
Model = require('web.Model'),
Dialog = require('web.Dialog');
@@ -33,20 +32,29 @@ odoo.define('web.web_ir_actions_act_window_message', function(require)
})
}
+ var is_html = action.is_html_message === true;
+ var content_properties = {};
+
+ if (is_html) {
+ content_properties = {
+ html: action.message,
+ };
+ } else {
+ content_properties = {
+ text: action.message,
+ css: {
+ 'white-space': 'pre-line',
+ }
+ };
+ }
+
var dialog = new Dialog(
this,
_.extend(
{
size: 'medium',
title: action.title,
- $content: $('
+{
+ 'type':'ir.actions.act_window.message',
+ 'title':_('My title'),
+ 'message':_('My message'),
+ # optional title of the close button, if not set, will be _('Close')
+ # if set False, no close button will be shown
+ # you can create your own close button with an action of type
+ # ir.actions.act_window_close
+ 'close_button_title':'Make this window go away',
+ # Use HTML instead of text
+ 'is_html_message':True,
+ # this is an optional list of buttons to show
+ 'buttons':[
+ # a button can be any action (also ir.actions.report.xml et al)
+ {
+ 'type':'ir.actions.act_window',
+ 'name':'All customers',
+ 'res_model':'res.partner',
+ 'view_mode':'form',
+ 'views':[[False,'list'],[False,'form']],
+ 'domain':[('customer','=',True)],
+ },
+ # or if type == method, you need to pass a model, a method name and
+ # parameters
+ {
+ 'type':'method',
+ 'name':_('Yes, do it'),
+ 'model':self._name,
+ 'method':'myfunction',
+ # list of arguments to pass positionally
+ 'args':[self.ids],
+ # dictionary of keyword arguments
+ 'kwargs':{'force':True},
+ # button style
+ 'classes':'btn-primary',
+ }
+ ]
+}
+
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.
+
Do not contact contributors directly about support or help with technical issues.
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.
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
@@ -447,16 +452,16 @@
From 844c1d0010816c26281b5267d340d6f55634d4e7 Mon Sep 17 00:00:00 2001
From: Vicent-S73
Date: Fri, 7 Nov 2025 11:58:10 +0100
Subject: [PATCH 106/454] [IMP] web_ir_act_window_message: pre-commit auto
fixes
---
web_ir_actions_act_window_message/README.rst | 10 +++++-----
web_ir_actions_act_window_message/__manifest__.py | 2 +-
.../static/description/index.html | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/web_ir_actions_act_window_message/README.rst b/web_ir_actions_act_window_message/README.rst
index 8bbf40165459..81fe2301fd25 100644
--- a/web_ir_actions_act_window_message/README.rst
+++ b/web_ir_actions_act_window_message/README.rst
@@ -21,13 +21,13 @@ Client side message boxes
: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/18.0/web_ir_actions_act_window_message
+ :target: https://github.com/OCA/web/tree/19.0/web_ir_actions_act_window_message
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_ir_actions_act_window_message
+ :target: https://translation.odoo-community.org/projects/web-19-0/web-19-0-web_ir_actions_act_window_message
: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=18.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=19.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -100,7 +100,7 @@ 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -140,6 +140,6 @@ 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.
+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_message/__manifest__.py b/web_ir_actions_act_window_message/__manifest__.py
index 0cfce8a88952..8ab6dbc372e3 100644
--- a/web_ir_actions_act_window_message/__manifest__.py
+++ b/web_ir_actions_act_window_message/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Client side message boxes",
"version": "18.0.1.0.0",
- "author": "Therp BV, " "ACSONE SA/NV, " "Odoo Community Association (OCA)",
+ "author": "Therp BV, ACSONE SA/NV, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
"license": "AGPL-3",
"category": "Hidden/Dependency",
diff --git a/web_ir_actions_act_window_message/static/description/index.html b/web_ir_actions_act_window_message/static/description/index.html
index 78cf10e74592..7e524f5adc0d 100644
--- a/web_ir_actions_act_window_message/static/description/index.html
+++ b/web_ir_actions_act_window_message/static/description/index.html
@@ -374,7 +374,7 @@
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.
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.
+
This module is part of the OCA/web project on GitHub.
Demo data contains server actions on the module model that demo the
+features of this addon, those are also convenient for reviewers and
+migrators to verify correct function.
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.
From 7822168085ea9385ba9634b8052d6f357cf9c3ce Mon Sep 17 00:00:00 2001
From: Holger Brunn
Date: Fri, 7 Nov 2025 16:10:49 +0100
Subject: [PATCH 110/454] [FIX] web_ir_actions_act_window_message: remove
incorrect documentation
(cherry picked from commit 5f164f56d85dda3bfaf066074df114db833677d7)
---
web_ir_actions_act_window_message/README.rst | 2 --
web_ir_actions_act_window_message/readme/USAGE.md | 2 --
web_ir_actions_act_window_message/static/description/index.html | 2 --
3 files changed, 6 deletions(-)
diff --git a/web_ir_actions_act_window_message/README.rst b/web_ir_actions_act_window_message/README.rst
index b0e9c5d88b73..e4b8cc7c84b9 100644
--- a/web_ir_actions_act_window_message/README.rst
+++ b/web_ir_actions_act_window_message/README.rst
@@ -53,8 +53,6 @@ Depend on this module and return
'message': _('My message'),
# optional title of the close button, if not set, will be _('Close')
# if set False, no close button will be shown
- # you can create your own close button with an action of type
- # ir.actions.act_window_close
'close_button_title': 'Make this window go away',
# Use HTML instead of text
'is_html_message': True,
diff --git a/web_ir_actions_act_window_message/readme/USAGE.md b/web_ir_actions_act_window_message/readme/USAGE.md
index 0077754da0c2..d9bbccfd8a30 100644
--- a/web_ir_actions_act_window_message/readme/USAGE.md
+++ b/web_ir_actions_act_window_message/readme/USAGE.md
@@ -7,8 +7,6 @@ Depend on this module and return
'message': _('My message'),
# optional title of the close button, if not set, will be _('Close')
# if set False, no close button will be shown
- # you can create your own close button with an action of type
- # ir.actions.act_window_close
'close_button_title': 'Make this window go away',
# Use HTML instead of text
'is_html_message': True,
diff --git a/web_ir_actions_act_window_message/static/description/index.html b/web_ir_actions_act_window_message/static/description/index.html
index 5a98ab77f9e0..dd645880fe23 100644
--- a/web_ir_actions_act_window_message/static/description/index.html
+++ b/web_ir_actions_act_window_message/static/description/index.html
@@ -401,8 +401,6 @@
'message':_('My message'),# optional title of the close button, if not set, will be _('Close')# if set False, no close button will be shown
-# you can create your own close button with an action of type
-# ir.actions.act_window_close'close_button_title':'Make this window go away',# Use HTML instead of text'is_html_message':True,
From 29f93e71f798616b9268ae3727f2612294b31e04 Mon Sep 17 00:00:00 2001
From: Holger Brunn
Date: Fri, 7 Nov 2025 16:13:04 +0100
Subject: [PATCH 111/454] [DEL] web_ir_actions_act_window_message: remove entry
from roadmap
this possible now already with web_notify
(cherry picked from commit 827a6729bd448838551ee494c41c911da93346ac)
---
web_ir_actions_act_window_message/README.rst | 1 -
web_ir_actions_act_window_message/readme/ROADMAP.md | 1 -
web_ir_actions_act_window_message/static/description/index.html | 1 -
3 files changed, 3 deletions(-)
diff --git a/web_ir_actions_act_window_message/README.rst b/web_ir_actions_act_window_message/README.rst
index e4b8cc7c84b9..e183c7999849 100644
--- a/web_ir_actions_act_window_message/README.rst
+++ b/web_ir_actions_act_window_message/README.rst
@@ -94,7 +94,6 @@ Known issues / Roadmap
======================
- add message_type to differenciate between warnings, errors, etc.
-- have one message_type to show a nonmodal warning on top right
Bug Tracker
===========
diff --git a/web_ir_actions_act_window_message/readme/ROADMAP.md b/web_ir_actions_act_window_message/readme/ROADMAP.md
index fdc126a7b20f..44d6a4be5ded 100644
--- a/web_ir_actions_act_window_message/readme/ROADMAP.md
+++ b/web_ir_actions_act_window_message/readme/ROADMAP.md
@@ -1,2 +1 @@
- add message_type to differenciate between warnings, errors, etc.
-- have one message_type to show a nonmodal warning on top right
diff --git a/web_ir_actions_act_window_message/static/description/index.html b/web_ir_actions_act_window_message/static/description/index.html
index dd645880fe23..3c0f50b9571f 100644
--- a/web_ir_actions_act_window_message/static/description/index.html
+++ b/web_ir_actions_act_window_message/static/description/index.html
@@ -441,7 +441,6 @@
diff --git a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.esm.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.esm.js
index 8be74551c6ea..510f48b82e5c 100644
--- a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.esm.js
+++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.esm.js
@@ -11,7 +11,6 @@ function openDialog({env, action}) {
action: action,
is_html_message: action.is_html_message,
size: "md",
- env: env,
});
}
diff --git a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_msg_component.esm.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_msg_component.esm.js
index 1c72aa96370f..fbf4f010ec6c 100644
--- a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_msg_component.esm.js
+++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_msg_component.esm.js
@@ -1,9 +1,13 @@
import {Component, onWillStart, useState} from "@odoo/owl";
import {Dialog} from "@web/core/dialog/dialog";
import {_t} from "@web/core/l10n/translation";
+import {useService} from "@web/core/utils/hooks";
+import {router} from "@web/core/browser/router";
export class ActWindowMessageDialog extends Component {
setup() {
+ this.orm = useService("orm");
+ this.action = useService("action");
this.state = useState({
buttons: [],
});
@@ -14,23 +18,28 @@ export class ActWindowMessageDialog extends Component {
this.generateButtons();
}
- _refreshWidget(env) {
- const controller = env.services.action.currentController;
- const state = env.services.router.current.hash;
+ _refreshWidget() {
+ const controller = this.action.currentController;
+ const state = router.current;
const props = controller.props;
- env.services.action.switchView(props.type, {resId: state.id});
+ this.action
+ .switchView(props.type, {
+ resId: state.resId,
+ })
+ .catch((err) => {
+ console.error("Error updating the view:", err);
+ window.location.reload();
+ });
}
generateButtons() {
var self = this;
const action = self.props.action;
- const env = self.props.env;
if (action.close_button_title !== false) {
self.state.buttons.push({
name: action.close_button_title || _t("Close"),
click: () => {
- // Refresh the view before closing the dialog
- self._refreshWidget(env);
+ self._refreshWidget();
self.props.close();
},
classes: "btn btn-default",
@@ -43,23 +52,26 @@ export class ActWindowMessageDialog extends Component {
classes: button.classes || "btn btn-default",
click: () => {
if (button.type === "method") {
- env.services
- .rpc("/web/dataset/call_button", {
- model: button.model,
- method: button.method,
- args: button.args,
- kwargs: button.kwargs,
- })
- .then(function (result) {
+ self.orm
+ .call(
+ button.model,
+ button.method,
+ button.args,
+ button.kwargs
+ )
+ .then((result) => {
if (typeof result === "object") {
- return env.services.action.doAction(result);
+ return self.action.doAction(result).then(() => {
+ self.props.close();
+ });
}
- self._refreshWidget(env);
+ self._refreshWidget();
});
} else {
- return env.services.action.doAction(button);
+ return self.action.doAction(button).then(() => {
+ self.props.close();
+ });
}
- self.props.close();
},
};
self.state.buttons.push(button_data);
@@ -82,7 +94,6 @@ ActWindowMessageDialog.props = {
optional: true,
},
action: {type: Object, optional: true},
- env: {type: Object, optional: true},
is_html_message: {type: Boolean, optional: true},
size: {type: String},
close: Function,
From 4e6a1b709324722cf1d0dd8da1e98b79c5cceac2 Mon Sep 17 00:00:00 2001
From: Vicent-S73
Date: Tue, 25 Nov 2025 11:42:19 +0100
Subject: [PATCH 113/454] fixup! [MIG] web_ir_actions_act_window_message:
Migration to 19.0
---
.../src/js/web_ir_actions_act_window_msg_component.esm.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_msg_component.esm.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_msg_component.esm.js
index fbf4f010ec6c..941fc6d517e5 100644
--- a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_msg_component.esm.js
+++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_msg_component.esm.js
@@ -21,7 +21,15 @@ export class ActWindowMessageDialog extends Component {
_refreshWidget() {
const controller = this.action.currentController;
const state = router.current;
+ if (!controller || !controller.props || !state || !state.resId) {
+ console.warn("ActWindowMessageDialog: unable to refresh view");
+ return;
+ }
const props = controller.props;
+ if (!props.type) {
+ console.warn("Controller props.type is missing, cannot switch view");
+ return;
+ }
this.action
.switchView(props.type, {
resId: state.resId,
From 78a920e9db053332cf0b39ba8d595d7dd2e1294f Mon Sep 17 00:00:00 2001
From: Nicolas JEUDY
Date: Tue, 19 Nov 2013 00:12:30 +0100
Subject: [PATCH 114/454] - Rename web_m2o_enhanced to web_m2x_options - Add
static/description/index.html
fix: use include instead of extend in js function inheritance.
fix: not overwriting the existing object references with the result of the include
fix: update name according to new module name.
fix: error when displaying many2many field without options defined.
---
web_m2x_options/README.rst | 63 +++
web_m2x_options/__init__.py | 0
web_m2x_options/__openerp__.py | 46 +++
web_m2x_options/static/description/index.html | 391 ++++++++++++++++++
web_m2x_options/static/src/js/form.js | 224 ++++++++++
5 files changed, 724 insertions(+)
create mode 100644 web_m2x_options/README.rst
create mode 100644 web_m2x_options/__init__.py
create mode 100644 web_m2x_options/__openerp__.py
create mode 100644 web_m2x_options/static/description/index.html
create mode 100644 web_m2x_options/static/src/js/form.js
diff --git a/web_m2x_options/README.rst b/web_m2x_options/README.rst
new file mode 100644
index 000000000000..2b1fafdb57a2
--- /dev/null
+++ b/web_m2x_options/README.rst
@@ -0,0 +1,63 @@
+==================================
+Add new options for many2one field
+==================================
+
+
+Description
+-----------
+
+This modules modifies "many2one" form fields so as to add some new display
+control options.
+
+** New: support many2manytags widget ! **
+
+Options provided includes possibility to remove "Create..." and/or "Create and
+Edit..." entries from many2one drop down. You can also change default number of
+proposition appearing in the drop-down. Or prevent the dialog box poping in
+case of validation error.
+
+If not specified, the module will avoid proposing any of the create options
+if the current user have no permission rights to create the related object.
+
+
+Requirements
+------------
+
+Was tested on openerp v7.0
+
+
+New option
+----------
+
+``create`` *boolean* (Default: depends if user have create rights)
+
+ Whether to display the "Create..." entry in dropdown panel.
+
+``create_edit`` *boolean* (Default: depends if user have create rights)
+
+ Whether to display "Create and Edit..." entry in dropdown panel
+
+``m2o_dialog`` *boolean* (Default: depends if user have create rights)
+
+ Whether to display the many2one dialog in case of validation error.
+
+``limit`` *int* (Default: openerp default value is ``7``)
+
+ Number of displayed record in drop-down panel
+
+
+Example
+-------
+
+Your XML form view definition could contain::
+
+ ...
+
+ ...
+
+Note
+----
+
+Double check that you have no inherited view that remote ``options`` you set on a field !
+If nothing work, add a debugger in the first ligne of ``get_search_result method`` and enable debug mode in OpenERP. When you write something in a many2one field, javascript debugger should pause. If not verify your installation.
+
diff --git a/web_m2x_options/__init__.py b/web_m2x_options/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/web_m2x_options/__openerp__.py b/web_m2x_options/__openerp__.py
new file mode 100644
index 000000000000..f428885e4a5e
--- /dev/null
+++ b/web_m2x_options/__openerp__.py
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+
+{
+ "name": 'web_m2x_options',
+ "version": "0.1",
+ "description":
+"""
+=====================================================
+Add new options for many2one and many2manytags field:
+=====================================================
+
+- create: true/false -> disable "create" entry in dropdown panel
+- create_edit: true/false -> disable "create and edit" entry in dropdown panel
+- limit: 10 (int) -> change number of selected record return in dropdown panel
+- m2o_dialog: true/false -> disable quick create M20Dialog triggered on error.
+
+Example:
+--------
+
+
+
+Note:
+-----
+
+if one of those options are not set, many2one field use default many2one field options.
+
+Thanks to:
+----------
+
+- Nicolas JEUDY
+- Valentin LAB
+
+""",
+ "depends": [
+ 'base',
+ 'web',
+ ],
+ "js": [
+ 'static/src/js/form.js',
+ ],
+ "author": "Tuxservices",
+ "installable" : True,
+ "active" : False,
+}
+
+
diff --git a/web_m2x_options/static/description/index.html b/web_m2x_options/static/description/index.html
new file mode 100644
index 000000000000..30abedb7a5d9
--- /dev/null
+++ b/web_m2x_options/static/description/index.html
@@ -0,0 +1,391 @@
+
+
+
+
+
+
+Add new options for many2one field
+
+
+
+
+
Add new options for many2one field
+
+
+
Description
+
This modules modifies "many2one" form fields so as to add some new display
+control options.
+
** New: support many2manytags widget ! **
+
Options provided includes possibility to remove "Create..." and/or "Create and
+Edit..." entries from many2one drop down. You can also change default number of
+proposition appearing in the drop-down. Or prevent the dialog box poping in
+case of validation error.
+
If not specified, the module will avoid proposing any of the create options
+if the current user have no permission rights to create the related object.
+
+
+
Requirements
+
Was tested on openerp v7.0
+
+
+
New option
+
createboolean (Default: depends if user have create rights)
+
+Whether to display the "Create..." entry in dropdown panel.
+
create_editboolean (Default: depends if user have create rights)
+
+Whether to display "Create and Edit..." entry in dropdown panel
+
m2o_dialogboolean (Default: depends if user have create rights)
+
+Whether to display the many2one dialog in case of validation error.
Double check that you have no inherited view that remote options you set on a field !
+If nothing work, add a debugger in the first ligne of get_search_result method and enable debug mode in OpenERP. When you write something in a many2one field, javascript debugger should pause. If not verify your installation.
+
+
+
+
diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js
new file mode 100644
index 000000000000..00885a098b54
--- /dev/null
+++ b/web_m2x_options/static/src/js/form.js
@@ -0,0 +1,224 @@
+/*global openerp, _, $ */
+
+openerp.web_m2x_options = function (instance) {
+
+ "use strict";
+
+ var QWeb = instance.web.qweb,
+ _t = instance.web._t,
+ _lt = instance.web._lt;
+
+ instance.web.form.FieldMany2One.include({
+
+ show_error_displayer: function () {
+ if ((typeof this.options.m2o_dialog === 'undefined' && this.can_create) ||
+ this.options.m2o_dialog) {
+ new instance.web.form.M2ODialog(this).open();
+ }
+ },
+
+ get_search_result: function (search_val) {
+
+ var def = $.Deferred();
+ var self = this;
+ // add options limit used to change number of selections record
+ // returned.
+
+ if (typeof this.options.limit === 'number') {
+ this.limit = this.options.limit;
+ }
+
+ var dataset = new instance.web.DataSet(this, this.field.relation,
+ self.build_context());
+ var blacklist = this.get_search_blacklist();
+ this.last_query = search_val;
+
+ var search_result = this.orderer.add(dataset.name_search(
+ search_val,
+ new instance.web.CompoundDomain(
+ self.build_domain(), [["id", "not in", blacklist]]),
+ 'ilike', this.limit + 1,
+ self.build_context()));
+
+ var create_rights;
+ if (typeof this.options.create === "undefined" ||
+ typeof this.options.create_edit === "undefined") {
+ create_rights = new instance.web.Model(this.field.relation).call(
+ "check_access_rights", ["create", false]);
+ }
+
+ $.when(search_result, create_rights).then(function (_data, _can_create) {
+ var data = _data[0];
+
+ var can_create = _can_create ? _can_create[0] : null;
+
+ self.can_create = can_create; // for ``.show_error_displayer()``
+ self.last_search = data;
+ // possible selections for the m2o
+ var values = _.map(data, function (x) {
+ x[1] = x[1].split("\n")[0];
+ return {
+ label: _.str.escapeHTML(x[1]),
+ value: x[1],
+ name: x[1],
+ id: x[0],
+ };
+ });
+
+ // search more... if more results that max
+
+ if (values.length > self.limit) {
+ values = values.slice(0, self.limit);
+ values.push({
+ label: _t("Search More..."),
+ action: function () {
+ dataset.name_search(
+ search_val, self.build_domain(),
+ 'ilike', false).done(function (data) {
+ self._search_create_popup("search", data);
+ });
+ },
+ classname: 'oe_m2o_dropdown_option'
+ });
+ }
+
+ // quick create
+
+ var raw_result = _(data.result).map(function (x) {
+ return x[1];
+ });
+
+ if ((typeof self.options.create === 'undefined' && can_create) ||
+ self.options.create) {
+
+ if (search_val.length > 0 &&
+ !_.include(raw_result, search_val)) {
+
+ values.push({
+ label: _.str.sprintf(
+ _t('Create "%s"'),
+ $('').text(search_val).html()),
+ action: function () {
+ self._quick_create(search_val);
+ },
+ classname: 'oe_m2o_dropdown_option'
+ });
+ }
+ }
+
+ // create...
+
+ if ((typeof self.options.create_edit === 'undefined' && can_create) ||
+ self.options.create_edit) {
+
+ values.push({
+ label: _t("Create and Edit..."),
+ action: function () {
+ self._search_create_popup(
+ "form", undefined,
+ self._create_context(search_val));
+ },
+ classname: 'oe_m2o_dropdown_option'
+ });
+ }
+
+ def.resolve(values);
+ });
+
+ return def;
+ }
+ });
+
+ instance.web.form.FieldMany2ManyTags.include({
+
+ show_error_displayer: function () {
+ if ((typeof this.options.m2o_dialog === 'undefined' && this.can_create) ||
+ this.options.m2o_dialog) {
+ new instance.web.form.M2ODialog(this).open();
+ }
+ },
+
+ /**
+ * Call this method to search using a string.
+ */
+
+ get_search_result: function(search_val) {
+ var self = this;
+
+ // add options limit used to change number of selections record
+ // returned.
+
+ if (typeof this.options.limit === 'number') {
+ this.limit = this.options.limit;
+ }
+
+ var dataset = new instance.web.DataSet(this, this.field.relation, self.build_context());
+ var blacklist = this.get_search_blacklist();
+ this.last_query = search_val;
+
+ return this.orderer.add(dataset.name_search(
+ search_val, new instance.web.CompoundDomain(self.build_domain(), [["id", "not in", blacklist]]),
+ 'ilike', this.limit + 1, self.build_context())).then(function(data) {
+ self.last_search = data;
+ // possible selections for the m2o
+ var values = _.map(data, function(x) {
+ x[1] = x[1].split("\n")[0];
+ return {
+ label: _.str.escapeHTML(x[1]),
+ value: x[1],
+ name: x[1],
+ id: x[0],
+ };
+ });
+
+ // search more... if more results that max
+ if (values.length > self.limit) {
+ values = values.slice(0, self.limit);
+ values.push({
+ label: _t("Search More..."),
+ action: function() {
+ dataset.name_search(search_val, self.build_domain(), 'ilike', false).done(function(data) {
+ self._search_create_popup("search", data);
+ });
+ },
+ classname: 'oe_m2o_dropdown_option'
+ });
+ }
+ // quick create
+
+ if ((typeof self.options.create === 'undefined') ||
+ self.options.create) {
+
+ var raw_result = _(data.result).map(function(x) {return x[1];});
+ if (search_val.length > 0 && !_.include(raw_result, search_val)) {
+ values.push({
+ label: _.str.sprintf(_t('Create "%s"'),
+ $('').text(search_val).html()),
+ action: function() {
+ self._quick_create(search_val);
+ },
+ classname: 'oe_m2o_dropdown_option'
+ });
+ }
+ }
+
+ // create...
+
+ if ((typeof self.options.create_edit === 'undefined') ||
+ self.options.create_edit) {
+
+ values.push({
+ label: _t("Create and Edit..."),
+ action: function() {
+ self._search_create_popup("form", undefined, self._create_context(search_val));
+ },
+ classname: 'oe_m2o_dropdown_option'
+ });
+ }
+
+ return values;
+ })
+ },
+ });
+};
+
From 53bac334c75379ad429b21612c2565945da16fa4 Mon Sep 17 00:00:00 2001
From: Holger Brunn
Date: Mon, 7 Jul 2014 13:11:28 +0200
Subject: [PATCH 115/454] move all addons to __unported__, set all addons as
not installable
---
web_m2x_options/README.rst | 63 ---
web_m2x_options/__init__.py | 0
web_m2x_options/__openerp__.py | 46 ---
web_m2x_options/static/description/index.html | 391 ------------------
web_m2x_options/static/src/js/form.js | 224 ----------
5 files changed, 724 deletions(-)
delete mode 100644 web_m2x_options/README.rst
delete mode 100644 web_m2x_options/__init__.py
delete mode 100644 web_m2x_options/__openerp__.py
delete mode 100644 web_m2x_options/static/description/index.html
delete mode 100644 web_m2x_options/static/src/js/form.js
diff --git a/web_m2x_options/README.rst b/web_m2x_options/README.rst
deleted file mode 100644
index 2b1fafdb57a2..000000000000
--- a/web_m2x_options/README.rst
+++ /dev/null
@@ -1,63 +0,0 @@
-==================================
-Add new options for many2one field
-==================================
-
-
-Description
------------
-
-This modules modifies "many2one" form fields so as to add some new display
-control options.
-
-** New: support many2manytags widget ! **
-
-Options provided includes possibility to remove "Create..." and/or "Create and
-Edit..." entries from many2one drop down. You can also change default number of
-proposition appearing in the drop-down. Or prevent the dialog box poping in
-case of validation error.
-
-If not specified, the module will avoid proposing any of the create options
-if the current user have no permission rights to create the related object.
-
-
-Requirements
-------------
-
-Was tested on openerp v7.0
-
-
-New option
-----------
-
-``create`` *boolean* (Default: depends if user have create rights)
-
- Whether to display the "Create..." entry in dropdown panel.
-
-``create_edit`` *boolean* (Default: depends if user have create rights)
-
- Whether to display "Create and Edit..." entry in dropdown panel
-
-``m2o_dialog`` *boolean* (Default: depends if user have create rights)
-
- Whether to display the many2one dialog in case of validation error.
-
-``limit`` *int* (Default: openerp default value is ``7``)
-
- Number of displayed record in drop-down panel
-
-
-Example
--------
-
-Your XML form view definition could contain::
-
- ...
-
- ...
-
-Note
-----
-
-Double check that you have no inherited view that remote ``options`` you set on a field !
-If nothing work, add a debugger in the first ligne of ``get_search_result method`` and enable debug mode in OpenERP. When you write something in a many2one field, javascript debugger should pause. If not verify your installation.
-
diff --git a/web_m2x_options/__init__.py b/web_m2x_options/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
diff --git a/web_m2x_options/__openerp__.py b/web_m2x_options/__openerp__.py
deleted file mode 100644
index f428885e4a5e..000000000000
--- a/web_m2x_options/__openerp__.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# -*- coding: utf-8 -*-
-
-{
- "name": 'web_m2x_options',
- "version": "0.1",
- "description":
-"""
-=====================================================
-Add new options for many2one and many2manytags field:
-=====================================================
-
-- create: true/false -> disable "create" entry in dropdown panel
-- create_edit: true/false -> disable "create and edit" entry in dropdown panel
-- limit: 10 (int) -> change number of selected record return in dropdown panel
-- m2o_dialog: true/false -> disable quick create M20Dialog triggered on error.
-
-Example:
---------
-
-
-
-Note:
------
-
-if one of those options are not set, many2one field use default many2one field options.
-
-Thanks to:
-----------
-
-- Nicolas JEUDY
-- Valentin LAB
-
-""",
- "depends": [
- 'base',
- 'web',
- ],
- "js": [
- 'static/src/js/form.js',
- ],
- "author": "Tuxservices",
- "installable" : True,
- "active" : False,
-}
-
-
diff --git a/web_m2x_options/static/description/index.html b/web_m2x_options/static/description/index.html
deleted file mode 100644
index 30abedb7a5d9..000000000000
--- a/web_m2x_options/static/description/index.html
+++ /dev/null
@@ -1,391 +0,0 @@
-
-
-
-
-
-
-Add new options for many2one field
-
-
-
-
-
Add new options for many2one field
-
-
-
Description
-
This modules modifies "many2one" form fields so as to add some new display
-control options.
-
** New: support many2manytags widget ! **
-
Options provided includes possibility to remove "Create..." and/or "Create and
-Edit..." entries from many2one drop down. You can also change default number of
-proposition appearing in the drop-down. Or prevent the dialog box poping in
-case of validation error.
-
If not specified, the module will avoid proposing any of the create options
-if the current user have no permission rights to create the related object.
-
-
-
Requirements
-
Was tested on openerp v7.0
-
-
-
New option
-
createboolean (Default: depends if user have create rights)
-
-Whether to display the "Create..." entry in dropdown panel.
-
create_editboolean (Default: depends if user have create rights)
-
-Whether to display "Create and Edit..." entry in dropdown panel
-
m2o_dialogboolean (Default: depends if user have create rights)
-
-Whether to display the many2one dialog in case of validation error.
Double check that you have no inherited view that remote options you set on a field !
-If nothing work, add a debugger in the first ligne of get_search_result method and enable debug mode in OpenERP. When you write something in a many2one field, javascript debugger should pause. If not verify your installation.
-
-
-
-
diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js
deleted file mode 100644
index 00885a098b54..000000000000
--- a/web_m2x_options/static/src/js/form.js
+++ /dev/null
@@ -1,224 +0,0 @@
-/*global openerp, _, $ */
-
-openerp.web_m2x_options = function (instance) {
-
- "use strict";
-
- var QWeb = instance.web.qweb,
- _t = instance.web._t,
- _lt = instance.web._lt;
-
- instance.web.form.FieldMany2One.include({
-
- show_error_displayer: function () {
- if ((typeof this.options.m2o_dialog === 'undefined' && this.can_create) ||
- this.options.m2o_dialog) {
- new instance.web.form.M2ODialog(this).open();
- }
- },
-
- get_search_result: function (search_val) {
-
- var def = $.Deferred();
- var self = this;
- // add options limit used to change number of selections record
- // returned.
-
- if (typeof this.options.limit === 'number') {
- this.limit = this.options.limit;
- }
-
- var dataset = new instance.web.DataSet(this, this.field.relation,
- self.build_context());
- var blacklist = this.get_search_blacklist();
- this.last_query = search_val;
-
- var search_result = this.orderer.add(dataset.name_search(
- search_val,
- new instance.web.CompoundDomain(
- self.build_domain(), [["id", "not in", blacklist]]),
- 'ilike', this.limit + 1,
- self.build_context()));
-
- var create_rights;
- if (typeof this.options.create === "undefined" ||
- typeof this.options.create_edit === "undefined") {
- create_rights = new instance.web.Model(this.field.relation).call(
- "check_access_rights", ["create", false]);
- }
-
- $.when(search_result, create_rights).then(function (_data, _can_create) {
- var data = _data[0];
-
- var can_create = _can_create ? _can_create[0] : null;
-
- self.can_create = can_create; // for ``.show_error_displayer()``
- self.last_search = data;
- // possible selections for the m2o
- var values = _.map(data, function (x) {
- x[1] = x[1].split("\n")[0];
- return {
- label: _.str.escapeHTML(x[1]),
- value: x[1],
- name: x[1],
- id: x[0],
- };
- });
-
- // search more... if more results that max
-
- if (values.length > self.limit) {
- values = values.slice(0, self.limit);
- values.push({
- label: _t("Search More..."),
- action: function () {
- dataset.name_search(
- search_val, self.build_domain(),
- 'ilike', false).done(function (data) {
- self._search_create_popup("search", data);
- });
- },
- classname: 'oe_m2o_dropdown_option'
- });
- }
-
- // quick create
-
- var raw_result = _(data.result).map(function (x) {
- return x[1];
- });
-
- if ((typeof self.options.create === 'undefined' && can_create) ||
- self.options.create) {
-
- if (search_val.length > 0 &&
- !_.include(raw_result, search_val)) {
-
- values.push({
- label: _.str.sprintf(
- _t('Create "%s"'),
- $('').text(search_val).html()),
- action: function () {
- self._quick_create(search_val);
- },
- classname: 'oe_m2o_dropdown_option'
- });
- }
- }
-
- // create...
-
- if ((typeof self.options.create_edit === 'undefined' && can_create) ||
- self.options.create_edit) {
-
- values.push({
- label: _t("Create and Edit..."),
- action: function () {
- self._search_create_popup(
- "form", undefined,
- self._create_context(search_val));
- },
- classname: 'oe_m2o_dropdown_option'
- });
- }
-
- def.resolve(values);
- });
-
- return def;
- }
- });
-
- instance.web.form.FieldMany2ManyTags.include({
-
- show_error_displayer: function () {
- if ((typeof this.options.m2o_dialog === 'undefined' && this.can_create) ||
- this.options.m2o_dialog) {
- new instance.web.form.M2ODialog(this).open();
- }
- },
-
- /**
- * Call this method to search using a string.
- */
-
- get_search_result: function(search_val) {
- var self = this;
-
- // add options limit used to change number of selections record
- // returned.
-
- if (typeof this.options.limit === 'number') {
- this.limit = this.options.limit;
- }
-
- var dataset = new instance.web.DataSet(this, this.field.relation, self.build_context());
- var blacklist = this.get_search_blacklist();
- this.last_query = search_val;
-
- return this.orderer.add(dataset.name_search(
- search_val, new instance.web.CompoundDomain(self.build_domain(), [["id", "not in", blacklist]]),
- 'ilike', this.limit + 1, self.build_context())).then(function(data) {
- self.last_search = data;
- // possible selections for the m2o
- var values = _.map(data, function(x) {
- x[1] = x[1].split("\n")[0];
- return {
- label: _.str.escapeHTML(x[1]),
- value: x[1],
- name: x[1],
- id: x[0],
- };
- });
-
- // search more... if more results that max
- if (values.length > self.limit) {
- values = values.slice(0, self.limit);
- values.push({
- label: _t("Search More..."),
- action: function() {
- dataset.name_search(search_val, self.build_domain(), 'ilike', false).done(function(data) {
- self._search_create_popup("search", data);
- });
- },
- classname: 'oe_m2o_dropdown_option'
- });
- }
- // quick create
-
- if ((typeof self.options.create === 'undefined') ||
- self.options.create) {
-
- var raw_result = _(data.result).map(function(x) {return x[1];});
- if (search_val.length > 0 && !_.include(raw_result, search_val)) {
- values.push({
- label: _.str.sprintf(_t('Create "%s"'),
- $('').text(search_val).html()),
- action: function() {
- self._quick_create(search_val);
- },
- classname: 'oe_m2o_dropdown_option'
- });
- }
- }
-
- // create...
-
- if ((typeof self.options.create_edit === 'undefined') ||
- self.options.create_edit) {
-
- values.push({
- label: _t("Create and Edit..."),
- action: function() {
- self._search_create_popup("form", undefined, self._create_context(search_val));
- },
- classname: 'oe_m2o_dropdown_option'
- });
- }
-
- return values;
- })
- },
- });
-};
-
From bc09b3155af92620f410474727b36a0a76043ed3 Mon Sep 17 00:00:00 2001
From: Nicolas JEUDY
Date: Mon, 5 Jan 2015 12:24:37 +0100
Subject: [PATCH 116/454] fix: obscur wrong path on last commit. recreate
portage from scratch.
---
web_m2x_options/README.rst | 115 +++++
web_m2x_options/__init__.py | 0
web_m2x_options/__openerp__.py | 14 +
web_m2x_options/static/description/icon.png | Bin 0 -> 9455 bytes
web_m2x_options/static/description/index.html | 412 ++++++++++++++++++
web_m2x_options/static/src/js/form.js | 341 +++++++++++++++
web_m2x_options/views/view.xml | 12 +
7 files changed, 894 insertions(+)
create mode 100644 web_m2x_options/README.rst
create mode 100644 web_m2x_options/__init__.py
create mode 100644 web_m2x_options/__openerp__.py
create mode 100644 web_m2x_options/static/description/icon.png
create mode 100644 web_m2x_options/static/description/index.html
create mode 100644 web_m2x_options/static/src/js/form.js
create mode 100644 web_m2x_options/views/view.xml
diff --git a/web_m2x_options/README.rst b/web_m2x_options/README.rst
new file mode 100644
index 000000000000..be6e76039157
--- /dev/null
+++ b/web_m2x_options/README.rst
@@ -0,0 +1,115 @@
+==================================
+Add new options for many2one field
+==================================
+
+
+Description
+-----------
+
+This modules modifies "many2one" and "many2manytags" form widgets so as to add some new display
+control options.
+
+**New: support many2manytags widget !**
+
+**New: support global option management with ir.config_parameter !**
+
+Options provided includes possibility to remove "Create..." and/or "Create and
+Edit..." entries from many2one drop down. You can also change default number of
+proposition appearing in the drop-down. Or prevent the dialog box poping in
+case of validation error.
+
+If not specified, the module will avoid proposing any of the create options
+if the current user have no permission rights to create the related object.
+
+
+Requirements
+------------
+
+Was tested on openerp 8.0, trunk, saas-5 branch. New way to import js file. (thanks to tfossoul)
+
+
+New options
+-----------
+
+``create`` *boolean* (Default: depends if user have create rights)
+
+ Whether to display the "Create..." entry in dropdown panel.
+
+``create_edit`` *boolean* (Default: depends if user have create rights)
+
+ Whether to display "Create and Edit..." entry in dropdown panel
+
+``m2o_dialog`` *boolean* (Default: depends if user have create rights)
+
+ Whether to display the many2one dialog in case of validation error.
+
+``limit`` *int* (Default: openerp default value is ``7``)
+
+ Number of displayed record in drop-down panel
+
+``search_more`` *boolean*
+
+ Used to force disable/enable search more button.
+
+``field_color`` *string*
+
+ A string to define the field used to define color.
+ This option has to be used with colors.
+
+``colors`` *dictionary*
+
+ A dictionary to link field value with a HTML color.
+ This option has to be used with field_color.
+
+
+
+ir.config_parameter options
+---------------------------
+
+Now you can disable "Create..." and "Create and Edit..." entry for all widgets in the odoo instance.
+If you disable one option, you can enable it for particular field by setting "create: True" option directly on the field definition.
+
+``web_m2x_options.create`` *boolean* (Default: depends if user have create rights)
+
+ Whether to display the "Create..." entry in dropdown panel for all fields in the odoo instance.
+
+``web_m2x_options.create_edit`` *boolean* (Default: depends if user have create rights)
+
+ Whether to display "Create and Edit..." entry in dropdown panel for all fields in the odoo instance.
+
+``web_m2x_options.m2o_dialog`` *boolean* (Default: depends if user have create rights)
+
+ Whether to display the many2one dialog in case of validation error for all fields in the odoo instance.
+
+``web_m2x_options.limit`` *int* (Default: openerp default value is ``7``)
+
+ Number of displayed record in drop-down panel for all fields in the odoo instance
+
+``web_m2x_options.search_more`` *boolean* (Default: default value is ``False``)
+
+ Whether the field should always show "Search more..." entry or not.
+
+To add these parameters go to Configuration -> Technical -> Parameters -> System Parameters and add new parameters like:
+
+- web_m2x_options.create: False
+- web_m2x_options.create_edit: False
+- web_m2x_options.m2o_dialog: False
+- web_m2x_options.limit: 10
+- web_m2x_options.search_more: True
+
+
+Example
+-------
+
+Your XML form view definition could contain::
+
+ ...
+
+ ...
+
+Note
+----
+
+Double check that you have no inherited view that remote ``options`` you set on a field !
+If nothing work, add a debugger in the first ligne of ``get_search_result method`` and enable debug mode in OpenERP. When you write something in a many2one field, javascript debugger should pause. If not verify your installation.
+
diff --git a/web_m2x_options/__init__.py b/web_m2x_options/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/web_m2x_options/__openerp__.py b/web_m2x_options/__openerp__.py
new file mode 100644
index 000000000000..37b7dbf4e770
--- /dev/null
+++ b/web_m2x_options/__openerp__.py
@@ -0,0 +1,14 @@
+# -*- coding: utf-8 -*-
+
+{
+ "name": 'web_m2x_options',
+ "version": "8.0.0.2",
+ "depends": [
+ 'base',
+ 'web',
+ ],
+ 'data': ['views/view.xml'],
+ "author": "0k.io,Odoo Community Association (OCA)",
+ "installable": True,
+ "active": False,
+}
diff --git a/web_m2x_options/static/description/icon.png b/web_m2x_options/static/description/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d
GIT binary patch
literal 9455
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
z
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
Xviia!U7SGha1wx#SCgwmn*{w2TRX*I
literal 0
HcmV?d00001
diff --git a/web_m2x_options/static/description/index.html b/web_m2x_options/static/description/index.html
new file mode 100644
index 000000000000..bf406ab1885f
--- /dev/null
+++ b/web_m2x_options/static/description/index.html
@@ -0,0 +1,412 @@
+
+
+
+
+
+
+Add new options for many2one field
+
+
+
+
+
Add new options for many2one field
+
+
+
Description
+
This modules modifies "many2one" and "many2manytags" form widgets so as to add some new display
+control options.
+
New: support many2manytags widget !
+
New: support global option management with ir.config_parameter !
+
Options provided includes possibility to remove "Create..." and/or "Create and
+Edit..." entries from many2one drop down. You can also change default number of
+proposition appearing in the drop-down. Or prevent the dialog box poping in
+case of validation error.
+
If not specified, the module will avoid proposing any of the create options
+if the current user have no permission rights to create the related object.
+
+
+
Requirements
+
Was tested on openerp 8.0, trunk, saas-5 branch. New way to import js file. (thanks to tfossoul)
+
+
+
New options
+
createboolean (Default: depends if user have create rights)
+
+Whether to display the "Create..." entry in dropdown panel.
+
create_editboolean (Default: depends if user have create rights)
+
+Whether to display "Create and Edit..." entry in dropdown panel
+
m2o_dialogboolean (Default: depends if user have create rights)
+
+Whether to display the many2one dialog in case of validation error.
+
limitint (Default: openerp default value is 7)
+
+Number of displayed record in drop-down panel
+
+
+
ir.config_parameter options
+
Now you can disable "Create..." and "Create and Edit..." entry for all widgets in the odoo instance.
+If you disable one option, you can enable it for particular field by setting "create: True" option directly on the field definition.
+
web_m2x_options.createboolean (Default: depends if user have create rights)
+
+Whether to display the "Create..." entry in dropdown panel for all fields in the odoo instance.
+
web_m2x_options.create_editboolean (Default: depends if user have create rights)
+
+Whether to display "Create and Edit..." entry in dropdown panel for all fields in the odoo instance.
+
web_m2x_options.limitint (Default: openerp default value is 7)
+
+Number of displayed record in drop-down panel for all fields in the odoo instance
+
To add these parameters go to Configuration -> Technical -> Parameters -> System Parameters and add new parameters like:
Double check that you have no inherited view that remote options you set on a field !
+If nothing work, add a debugger in the first ligne of get_search_result method and enable debug mode in OpenERP. When you write something in a many2one field, javascript debugger should pause. If not verify your installation.
+
+
+
+
diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js
new file mode 100644
index 000000000000..bc4d3bebd335
--- /dev/null
+++ b/web_m2x_options/static/src/js/form.js
@@ -0,0 +1,341 @@
+/*global openerp, _, $ */
+
+openerp.web_m2x_options = function (instance) {
+
+ "use strict";
+
+ var QWeb = instance.web.qweb,
+ _t = instance.web._t,
+ _lt = instance.web._lt;
+
+ var OPTIONS = ['web_m2x_options.create',
+ 'web_m2x_options.create_edit',
+ 'web_m2x_options.limit',
+ 'web_m2x_options.search_more',
+ 'web_m2x_options.m2o_dialog',];
+
+ instance.web.form.FieldMany2One = instance.web.form.FieldMany2One.extend({
+
+ start: function() {
+ this._super.apply(this, arguments);
+ return this.get_options();
+ },
+
+ get_options: function() {
+ var self = this;
+ if (!_.isUndefined(this.view) && _.isUndefined(this.view.ir_options_loaded)) {
+ this.view.ir_options_loaded = $.Deferred();
+ this.view.ir_options = {};
+ (new instance.web.Model("ir.config_parameter"))
+ .query(["key", "value"]).filter([['key', 'in', OPTIONS]])
+ .all().then(function(records) {
+ _(records).each(function(record) {
+ self.view.ir_options[record.key] = record.value;
+ });
+ self.view.ir_options_loaded.resolve();
+ });
+ return this.view.ir_options_loaded;
+ }
+ return $.when();
+ },
+
+ is_option_set: function(option) {
+ if (_.isUndefined(option)) {
+ return false
+ }
+ var is_string = typeof option === 'string'
+ var is_bool = typeof option === 'boolean'
+ if (is_string) {
+ return option === 'true' || option === 'True'
+ } else if (is_bool) {
+ return option
+ }
+ return false
+ },
+
+ show_error_displayer: function () {
+ if(this.is_option_set(this.options.m2o_dialog) ||
+ _.isUndefined(this.options.m2o_dialog) && this.is_option_set(this.view.ir_options['web_m2x_options.m2o_dialog']) ||
+ this.can_create && _.isUndefined(this.options.m2o_dialog) && _.isUndefined(this.view.ir_options['web_m2x_options.m2o_dialog'])) {
+ new instance.web.form.M2ODialog(this).open();
+ }
+ },
+
+ get_search_result: function (search_val) {
+ var Objects = new instance.web.Model(this.field.relation);
+ var def = $.Deferred();
+ var self = this;
+ // add options limit used to change number of selections record
+ // returned.
+ if (_.isUndefined(this.view))
+ return this._super.apply(this, arguments);
+ if (!_.isUndefined(this.view.ir_options['web_m2x_options.limit'])) {
+ this.limit = parseInt(this.view.ir_options['web_m2x_options.limit']);
+ }
+
+ if (typeof this.options.limit === 'number') {
+ this.limit = this.options.limit;
+ }
+
+ // add options search_more to force enable or disable search_more button
+ if (this.is_option_set(this.options.search_more) || _.isUndefined(this.options.search_more) && this.is_option_set(self.view.ir_options['web_m2x_options.search_more'])) {
+ this.search_more = true
+ }
+
+ // add options field_color and colors to color item(s) depending on field_color value
+ this.field_color = this.options.field_color
+ this.colors = this.options.colors
+
+ var dataset = new instance.web.DataSet(this, this.field.relation,
+ self.build_context());
+ var blacklist = this.get_search_blacklist();
+ this.last_query = search_val;
+
+ var search_result = this.orderer.add(dataset.name_search(
+ search_val,
+ new instance.web.CompoundDomain(
+ self.build_domain(), [["id", "not in", blacklist]]),
+ 'ilike', this.limit + 1,
+ self.build_context()));
+
+ var create_rights;
+ if (typeof this.options.create === "undefined" ||
+ typeof this.options.create_edit === "undefined") {
+ create_rights = new instance.web.Model(this.field.relation).call(
+ "check_access_rights", ["create", false]);
+ }
+
+ $.when(search_result, create_rights).then(function (data, can_create) {
+
+ self.can_create = can_create; // for ``.show_error_displayer()``
+ self.last_search = data;
+ // possible selections for the m2o
+ var values = _.map(data, function (x) {
+ x[1] = x[1].split("\n")[0];
+ return {
+ label: _.str.escapeHTML(x[1]),
+ value: x[1],
+ name: x[1],
+ id: x[0],
+ };
+ });
+
+ // Search result value colors
+
+ if (self.colors && self.field_color) {
+ var value_ids = [];
+ for (var index in values) {
+ value_ids.push(values[index].id);
+ }
+
+ // RPC request to get field_color from Objects
+ Objects.query([self.field_color])
+ .filter([['id', 'in', value_ids]])
+ .all().done(function (objects) {
+ for (var index in objects) {
+ for (var index_value in values) {
+ if (values[index_value].id == objects[index].id) {
+ // Find value in values by comparing ids
+ var value = values[index_value];
+
+ // Find color with field value as key
+ var color = self.colors[objects[index][self.field_color]] || 'black';
+ value.label = ''+value.label+'';
+ break;
+ }
+ }
+ }
+ def.resolve(values);
+ });
+ }
+
+ // search more... if more results that max
+
+ if (values.length > self.limit || self.search_more) {
+ values = values.slice(0, self.limit);
+ values.push({
+ label: _t("Search More..."),
+ action: function () {
+ dataset.name_search(
+ search_val, self.build_domain(),
+ 'ilike', false).done(function (data) {
+ self._search_create_popup("search", data);
+ });
+ },
+ classname: 'oe_m2o_dropdown_option'
+ });
+ }
+
+ // quick create
+
+ var raw_result = _(data.result).map(function (x) {
+ return x[1];
+ });
+
+ if ((_.isUndefined(self.options.create) && _.isUndefined(self.view.ir_options['web_m2x_options.create']) && can_create) ||
+ (_.isUndefined(self.options.create) && self.view.ir_options['web_m2x_options.create'] == "True") ||
+ self.options.create) {
+
+ if (search_val.length > 0 &&
+ !_.include(raw_result, search_val)) {
+
+ values.push({
+ label: _.str.sprintf(
+ _t('Create "%s"'),
+ $('').text(search_val).html()),
+ action: function () {
+ self._quick_create(search_val);
+ },
+ classname: 'oe_m2o_dropdown_option'
+ });
+ }
+ }
+
+ // create...
+
+ if ((_.isUndefined(self.options.create_edit) && _.isUndefined(self.view.ir_options['web_m2x_options.create_edit']) && can_create) ||
+ (_.isUndefined(self.options.create) && self.view.ir_options['web_m2x_options.create_edit'] == "True") ||
+ self.options.create_edit) {
+
+ values.push({
+ label: _t("Create and Edit..."),
+ action: function () {
+ self._search_create_popup(
+ "form", undefined,
+ self._create_context(search_val));
+ },
+ classname: 'oe_m2o_dropdown_option'
+ });
+ }
+
+ // Check if colors specified to wait for RPC
+ if (!(self.field_color && self.colors)){
+ def.resolve(values);
+ }
+ });
+
+ return def;
+ }
+ });
+
+ instance.web.form.FieldMany2ManyTags.include({
+
+ show_error_displayer: function () {
+ if ((typeof this.options.m2o_dialog === 'undefined' && this.can_create) ||
+ this.options.m2o_dialog) {
+ new instance.web.form.M2ODialog(this).open();
+ }
+ },
+
+ start: function() {
+ this._super.apply(this, arguments);
+ return this.get_options();
+ },
+
+ get_options: function() {
+ var self = this;
+ if (_.isUndefined(this.view.ir_options_loaded)) {
+ this.view.ir_options_loaded = $.Deferred();
+ this.view.ir_options = {};
+ (new instance.web.Model("ir.config_parameter"))
+ .query(["key", "value"]).filter([['key', 'in', OPTIONS]])
+ .all().then(function(records) {
+ _(records).each(function(record) {
+ self.view.ir_options[record.key] = record.value;
+ });
+ self.view.ir_options_loaded.resolve();
+ });
+ }
+ return this.view.ir_options_loaded;
+ },
+
+ /**
+ * Call this method to search using a string.
+ */
+
+ get_search_result: function(search_val) {
+ var self = this;
+
+ // add options limit used to change number of selections record
+ // returned.
+
+ if (!_.isUndefined(this.view.ir_options['web_m2x_options.limit'])) {
+ this.limit = parseInt(this.view.ir_options['web_m2x_options.limit']);
+ }
+
+ if (typeof this.options.limit === 'number') {
+ this.limit = this.options.limit;
+ }
+
+ var dataset = new instance.web.DataSet(this, this.field.relation, self.build_context());
+ var blacklist = this.get_search_blacklist();
+ this.last_query = search_val;
+
+ return this.orderer.add(dataset.name_search(
+ search_val, new instance.web.CompoundDomain(self.build_domain(), [["id", "not in", blacklist]]),
+ 'ilike', this.limit + 1, self.build_context())).then(function(data) {
+ self.last_search = data;
+ // possible selections for the m2o
+ var values = _.map(data, function(x) {
+ x[1] = x[1].split("\n")[0];
+ return {
+ label: _.str.escapeHTML(x[1]),
+ value: x[1],
+ name: x[1],
+ id: x[0],
+ };
+ });
+
+ // search more... if more results that max
+ if (values.length > self.limit) {
+ values = values.slice(0, self.limit);
+ values.push({
+ label: _t("Search More..."),
+ action: function() {
+ dataset.name_search(search_val, self.build_domain(), 'ilike', false).done(function(data) {
+ self._search_create_popup("search", data);
+ });
+ },
+ classname: 'oe_m2o_dropdown_option'
+ });
+ }
+ // quick create
+
+ if ((_.isUndefined(self.options.create) && _.isUndefined(self.view.ir_options['web_m2x_options.create'])) ||
+ (_.isUndefined(self.options.create) && self.view.ir_options['web_m2x_options.create'] == 'True') ||
+ self.options.create) {
+
+ var raw_result = _(data.result).map(function(x) {return x[1];});
+ if (search_val.length > 0 && !_.include(raw_result, search_val)) {
+ values.push({
+ label: _.str.sprintf(_t('Create "%s"'),
+ $('').text(search_val).html()),
+ action: function() {
+ self._quick_create(search_val);
+ },
+ classname: 'oe_m2o_dropdown_option'
+ });
+ }
+ }
+
+ // create...
+
+ if ((_.isUndefined(self.options.create_edit === 'undefined') && _.isUndefined(self.view.ir_options['web_m2x_options.create_edit'])) ||
+ (_.isUndefined(self.options.create) && self.view.ir_options['web_m2x_options.create_edit'] == 'True') ||
+ self.options.create_edit) {
+
+ values.push({
+ label: _t("Create and Edit..."),
+ action: function() {
+ self._search_create_popup("form", undefined, self._create_context(search_val));
+ },
+ classname: 'oe_m2o_dropdown_option'
+ });
+ }
+
+ return values;
+ })
+ },
+ });
+};
+
diff --git a/web_m2x_options/views/view.xml b/web_m2x_options/views/view.xml
new file mode 100644
index 000000000000..9628625b5103
--- /dev/null
+++ b/web_m2x_options/views/view.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
From 09d776209a65a62831a9004f0644622efe2a4b03 Mon Sep 17 00:00:00 2001
From: Holger Brunn
Date: Fri, 10 Jul 2015 15:39:06 +0200
Subject: [PATCH 117/454] support 'open' on many2many_tags
[ADD] support 'no_open_edit' on many2one
[FIX] typos
---
web_m2x_options/README.rst | 91 +++++++++++++++++++------
web_m2x_options/__init__.py | 1 +
web_m2x_options/__openerp__.py | 4 ++
web_m2x_options/static/src/js/form.js | 24 +++++++
web_m2x_options/static/src/xml/base.xml | 13 ++++
5 files changed, 111 insertions(+), 22 deletions(-)
create mode 100644 web_m2x_options/static/src/xml/base.xml
diff --git a/web_m2x_options/README.rst b/web_m2x_options/README.rst
index be6e76039157..de0adaac3d33 100644
--- a/web_m2x_options/README.rst
+++ b/web_m2x_options/README.rst
@@ -1,35 +1,35 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
+
==================================
Add new options for many2one field
==================================
-
-Description
------------
-
This modules modifies "many2one" and "many2manytags" form widgets so as to add some new display
control options.
-**New: support many2manytags widget !**
-
-**New: support global option management with ir.config_parameter !**
-
Options provided includes possibility to remove "Create..." and/or "Create and
Edit..." entries from many2one drop down. You can also change default number of
proposition appearing in the drop-down. Or prevent the dialog box poping in
case of validation error.
If not specified, the module will avoid proposing any of the create options
-if the current user have no permission rights to create the related object.
+if the current user has no permission rights to create the related object.
+Usage
+=====
-Requirements
-------------
+.. 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/8.0
-Was tested on openerp 8.0, trunk, saas-5 branch. New way to import js file. (thanks to tfossoul)
+For further information, please visit:
+* https://www.odoo.com/forum/help-1
-New options
------------
+in the field's options dict
+---------------------------
``create`` *boolean* (Default: depends if user have create rights)
@@ -47,21 +47,27 @@ New options
Number of displayed record in drop-down panel
-``search_more`` *boolean*
+``search_more`` *boolean*
Used to force disable/enable search more button.
-
+
``field_color`` *string*
A string to define the field used to define color.
This option has to be used with colors.
-
+
``colors`` *dictionary*
A dictionary to link field value with a HTML color.
This option has to be used with field_color.
-
+``no_open_edit`` *boolean* (Default: value of ``no_open`` which is ``False`` if not set)
+
+ Causes a many2one not to offer to click through in edit mode, but well in read mode
+
+``open`` *boolean* (Default: ``False``)
+
+ Makes many2many_tags buttons that open the linked resource
ir.config_parameter options
---------------------------
@@ -107,9 +113,50 @@ Your XML form view definition could contain::
...
-Note
-----
+Known issues
+============
+
+Double check that you have no inherited view that remove ``options`` you set on a field !
+If nothing works, add a debugger in the first line of ``get_search_result method`` and enable debug mode in Odoo. When you write something in a many2one field, javascript debugger should pause. If not verify your installation.
+
+Roadmap
+=======
+
+- Instead of making the tags rectangle clickable, I think it's better to put the text as a clickable link, so we will get a consistent behaviour/aspect with other clickable elements (many2one...).
+- In edit mode, it would be great to add an icon like the one on many2one fields to allow to open the many2many in a popup window.
+- Include this feature as a configurable option via parameter to have this behaviour by default in all many2many tags.
+
+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
+------------
+
+* David Coninckx
+* Emanuel Cino
+* Holger Brunn
+* Nicolas JEUDY
+* Yannick Vaucher
+
+Maintainer
+----------
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
+
+This module is maintained by the OCA.
-Double check that you have no inherited view that remote ``options`` you set on a field !
-If nothing work, add a debugger in the first ligne of ``get_search_result method`` and enable debug mode in OpenERP. When you write something in a many2one field, javascript debugger should pause. If not verify your installation.
+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_m2x_options/__init__.py b/web_m2x_options/__init__.py
index e69de29bb2d1..57d631c3f004 100644
--- a/web_m2x_options/__init__.py
+++ b/web_m2x_options/__init__.py
@@ -0,0 +1 @@
+# coding: utf-8
diff --git a/web_m2x_options/__openerp__.py b/web_m2x_options/__openerp__.py
index 37b7dbf4e770..c87994c71a61 100644
--- a/web_m2x_options/__openerp__.py
+++ b/web_m2x_options/__openerp__.py
@@ -7,6 +7,10 @@
'base',
'web',
],
+ 'qweb': [
+ 'static/src/xml/base.xml',
+ ],
+ 'license': 'AGPL-3',
'data': ['views/view.xml'],
"author": "0k.io,Odoo Community Association (OCA)",
"installable": True,
diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js
index bc4d3bebd335..7342794ea2e5 100644
--- a/web_m2x_options/static/src/js/form.js
+++ b/web_m2x_options/static/src/js/form.js
@@ -336,6 +336,30 @@ openerp.web_m2x_options = function (instance) {
return values;
})
},
+
+ render_value: function()
+ {
+ var self = this;
+ return jQuery.when(this._super.apply(this, arguments))
+ .then(function()
+ {
+ if(self.options.open)
+ {
+ self.$el.find('.oe_tag')
+ .css('cursor', 'pointer')
+ .click(function(e)
+ {
+ var id = parseInt(jQuery(this).attr('data-id'));
+ self.do_action({
+ type: 'ir.actions.act_window',
+ res_model: self.field.relation,
+ views: [[false, 'form']],
+ res_id: id,
+ });
+ });
+ }
+ });
+ },
});
};
diff --git a/web_m2x_options/static/src/xml/base.xml b/web_m2x_options/static/src/xml/base.xml
new file mode 100644
index 000000000000..9fbf425eaadc
--- /dev/null
+++ b/web_m2x_options/static/src/xml/base.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ jQuery(this).attr('t-if', '!(widget.options.no_open || widget.options.no_open_edit)');
+
+
+
+
+ jQuery(this).attr('t-att-data-id', 'el[0]');
+
+
+
From df2e55637517d4104e0463f6086a2f2c793ee7c3 Mon Sep 17 00:00:00 2001
From: Antonio Espinosa
Date: Mon, 16 Nov 2015 13:00:04 +0100
Subject: [PATCH 118/454] web_m2x_options check Many2one and Many2many options
---
web_m2x_options/i18n/ar.po | 43 ++++++++++
web_m2x_options/i18n/de.po | 43 ++++++++++
web_m2x_options/i18n/es.po | 43 ++++++++++
web_m2x_options/i18n/fi.po | 43 ++++++++++
web_m2x_options/i18n/fr.po | 43 ++++++++++
web_m2x_options/i18n/it.po | 55 ++++++++++++
web_m2x_options/i18n/pt_BR.po | 43 ++++++++++
web_m2x_options/i18n/sl.po | 43 ++++++++++
web_m2x_options/i18n/tr.po | 44 ++++++++++
web_m2x_options/static/src/js/form.js | 117 +++++++++++++++-----------
10 files changed, 467 insertions(+), 50 deletions(-)
create mode 100644 web_m2x_options/i18n/ar.po
create mode 100644 web_m2x_options/i18n/de.po
create mode 100644 web_m2x_options/i18n/es.po
create mode 100644 web_m2x_options/i18n/fi.po
create mode 100644 web_m2x_options/i18n/fr.po
create mode 100644 web_m2x_options/i18n/it.po
create mode 100644 web_m2x_options/i18n/pt_BR.po
create mode 100644 web_m2x_options/i18n/sl.po
create mode 100644 web_m2x_options/i18n/tr.po
diff --git a/web_m2x_options/i18n/ar.po b/web_m2x_options/i18n/ar.po
new file mode 100644
index 000000000000..1011622c21a8
--- /dev/null
+++ b/web_m2x_options/i18n/ar.po
@@ -0,0 +1,43 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_m2x_options
+#
+# Translators:
+# SaFi J. , 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-02-26 02:05+0000\n"
+"PO-Revision-Date: 2015-12-16 17:30+0000\n"
+"Last-Translator: SaFi J. \n"
+"Language-Team: Arabic (http://www.transifex.com/oca/OCA-web-8-0/language/ar/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: ar\n"
+"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:191
+#: code:addons/web_m2x_options/static/src/js/form.js:330
+#, python-format
+msgid "Create \"%s\""
+msgstr "إنشاء \"%s\""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:213
+#: code:addons/web_m2x_options/static/src/js/form.js:351
+#, python-format
+msgid "Create and Edit..."
+msgstr "إنشاء وتحرير ..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:156
+#: code:addons/web_m2x_options/static/src/js/form.js:305
+#, python-format
+msgid "Search More..."
+msgstr "البحث عن المزيد ..."
diff --git a/web_m2x_options/i18n/de.po b/web_m2x_options/i18n/de.po
new file mode 100644
index 000000000000..112e2b911061
--- /dev/null
+++ b/web_m2x_options/i18n/de.po
@@ -0,0 +1,43 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_m2x_options
+#
+# Translators:
+# Rudolf Schnapka , 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-02-26 02:05+0000\n"
+"PO-Revision-Date: 2016-01-18 20:15+0000\n"
+"Last-Translator: Rudolf Schnapka \n"
+"Language-Team: German (http://www.transifex.com/oca/OCA-web-8-0/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_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:191
+#: code:addons/web_m2x_options/static/src/js/form.js:330
+#, python-format
+msgid "Create \"%s\""
+msgstr "Anlegen \"%s"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:213
+#: code:addons/web_m2x_options/static/src/js/form.js:351
+#, python-format
+msgid "Create and Edit..."
+msgstr "Anlegen und Bearbeiten"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:156
+#: code:addons/web_m2x_options/static/src/js/form.js:305
+#, python-format
+msgid "Search More..."
+msgstr "Suche weitere..."
diff --git a/web_m2x_options/i18n/es.po b/web_m2x_options/i18n/es.po
new file mode 100644
index 000000000000..7a4764bae86a
--- /dev/null
+++ b/web_m2x_options/i18n/es.po
@@ -0,0 +1,43 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_m2x_options
+#
+# Translators:
+# Pedro M. Baeza , 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-02-26 02:05+0000\n"
+"PO-Revision-Date: 2015-11-07 11:28+0000\n"
+"Last-Translator: Pedro M. Baeza \n"
+"Language-Team: Spanish (http://www.transifex.com/oca/OCA-web-8-0/language/es/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: es\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:191
+#: code:addons/web_m2x_options/static/src/js/form.js:330
+#, python-format
+msgid "Create \"%s\""
+msgstr "Crear \"%s\""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:213
+#: code:addons/web_m2x_options/static/src/js/form.js:351
+#, python-format
+msgid "Create and Edit..."
+msgstr "Crear y editar..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:156
+#: code:addons/web_m2x_options/static/src/js/form.js:305
+#, python-format
+msgid "Search More..."
+msgstr "Buscar más..."
diff --git a/web_m2x_options/i18n/fi.po b/web_m2x_options/i18n/fi.po
new file mode 100644
index 000000000000..9dab4ae40247
--- /dev/null
+++ b/web_m2x_options/i18n/fi.po
@@ -0,0 +1,43 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_m2x_options
+#
+# Translators:
+# Jarmo Kortetjärvi , 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-02-26 02:05+0000\n"
+"PO-Revision-Date: 2016-02-01 09:52+0000\n"
+"Last-Translator: Jarmo Kortetjärvi \n"
+"Language-Team: Finnish (http://www.transifex.com/oca/OCA-web-8-0/language/fi/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: fi\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:191
+#: code:addons/web_m2x_options/static/src/js/form.js:330
+#, python-format
+msgid "Create \"%s\""
+msgstr "Luo \"%s\""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:213
+#: code:addons/web_m2x_options/static/src/js/form.js:351
+#, python-format
+msgid "Create and Edit..."
+msgstr "Luo ja muokkaa..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:156
+#: code:addons/web_m2x_options/static/src/js/form.js:305
+#, python-format
+msgid "Search More..."
+msgstr "Hae lisää..."
diff --git a/web_m2x_options/i18n/fr.po b/web_m2x_options/i18n/fr.po
new file mode 100644
index 000000000000..448e0f4684ff
--- /dev/null
+++ b/web_m2x_options/i18n/fr.po
@@ -0,0 +1,43 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_m2x_options
+#
+# Translators:
+# Christophe CHAUVET , 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-05-06 15:50+0000\n"
+"PO-Revision-Date: 2016-05-06 08:27+0000\n"
+"Last-Translator: Christophe CHAUVET \n"
+"Language-Team: French (http://www.transifex.com/oca/OCA-web-8-0/language/fr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: fr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:191
+#: code:addons/web_m2x_options/static/src/js/form.js:330
+#, python-format
+msgid "Create \"%s\""
+msgstr "Creer \"%s\""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:213
+#: code:addons/web_m2x_options/static/src/js/form.js:351
+#, python-format
+msgid "Create and Edit..."
+msgstr "Créer et modifier..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:156
+#: code:addons/web_m2x_options/static/src/js/form.js:305
+#, python-format
+msgid "Search More..."
+msgstr "Rechercher plus..."
diff --git a/web_m2x_options/i18n/it.po b/web_m2x_options/i18n/it.po
new file mode 100644
index 000000000000..ce21776cee13
--- /dev/null
+++ b/web_m2x_options/i18n/it.po
@@ -0,0 +1,55 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_m2x_options
+#
+# Translators:
+# Ahmet Altınışık , 2015
+# Antonio Trueba, 2016
+# Armando Vulcano Junior , 2015
+# Carles Antoli , 2015
+# Bole , 2015
+# FIRST AUTHOR , 2012,2014
+# Giacomo , 2015
+# Hotellook, 2014
+# Jarmo Kortetjärvi , 2016
+# Paolo Valier, 2016
+# Paolo Valier, 2016
+# Rudolf Schnapka , 2016
+# Thomas A. Jaeger, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-28 07:09+0000\n"
+"PO-Revision-Date: 2016-04-28 06:46+0000\n"
+"Last-Translator: Paolo Valier\n"
+"Language-Team: Italian (http://www.transifex.com/oca/OCA-web-8-0/language/it/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: it\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:191
+#: code:addons/web_m2x_options/static/src/js/form.js:330
+#, python-format
+msgid "Create \"%s\""
+msgstr "Crea \"%s\""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:213
+#: code:addons/web_m2x_options/static/src/js/form.js:351
+#, python-format
+msgid "Create and Edit..."
+msgstr "Crea e Modifica..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:156
+#: code:addons/web_m2x_options/static/src/js/form.js:305
+#, python-format
+msgid "Search More..."
+msgstr "Cerca altro..."
diff --git a/web_m2x_options/i18n/pt_BR.po b/web_m2x_options/i18n/pt_BR.po
new file mode 100644
index 000000000000..8074af4c14d7
--- /dev/null
+++ b/web_m2x_options/i18n/pt_BR.po
@@ -0,0 +1,43 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_m2x_options
+#
+# Translators:
+# danimaribeiro , 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-03-11 02:17+0000\n"
+"PO-Revision-Date: 2016-03-05 16:20+0000\n"
+"Last-Translator: danimaribeiro \n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-web-8-0/language/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:191
+#: code:addons/web_m2x_options/static/src/js/form.js:330
+#, python-format
+msgid "Create \"%s\""
+msgstr "Criar \"%s\""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:213
+#: code:addons/web_m2x_options/static/src/js/form.js:351
+#, python-format
+msgid "Create and Edit..."
+msgstr "Criar e editar.."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:156
+#: code:addons/web_m2x_options/static/src/js/form.js:305
+#, python-format
+msgid "Search More..."
+msgstr "Buscar mais..."
diff --git a/web_m2x_options/i18n/sl.po b/web_m2x_options/i18n/sl.po
new file mode 100644
index 000000000000..c63f36ed9d72
--- /dev/null
+++ b/web_m2x_options/i18n/sl.po
@@ -0,0 +1,43 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_m2x_options
+#
+# Translators:
+# Matjaž Mozetič , 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-02-26 02:05+0000\n"
+"PO-Revision-Date: 2015-11-08 05:46+0000\n"
+"Last-Translator: Matjaž Mozetič \n"
+"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-web-8-0/language/sl/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: sl\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:191
+#: code:addons/web_m2x_options/static/src/js/form.js:330
+#, python-format
+msgid "Create \"%s\""
+msgstr "Ustvari \"%s\""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:213
+#: code:addons/web_m2x_options/static/src/js/form.js:351
+#, python-format
+msgid "Create and Edit..."
+msgstr "Ustvari in urejaj..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:156
+#: code:addons/web_m2x_options/static/src/js/form.js:305
+#, python-format
+msgid "Search More..."
+msgstr "Poišči več..."
diff --git a/web_m2x_options/i18n/tr.po b/web_m2x_options/i18n/tr.po
new file mode 100644
index 000000000000..c9418f2d1c2f
--- /dev/null
+++ b/web_m2x_options/i18n/tr.po
@@ -0,0 +1,44 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_m2x_options
+#
+# Translators:
+# Ahmet Altınışık , 2015
+# Ahmet Altınışık , 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-02-26 02:05+0000\n"
+"PO-Revision-Date: 2015-12-30 21:53+0000\n"
+"Last-Translator: Ahmet Altınışık \n"
+"Language-Team: Turkish (http://www.transifex.com/oca/OCA-web-8-0/language/tr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: tr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:191
+#: code:addons/web_m2x_options/static/src/js/form.js:330
+#, python-format
+msgid "Create \"%s\""
+msgstr "Oluştur \"%s\""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:213
+#: code:addons/web_m2x_options/static/src/js/form.js:351
+#, python-format
+msgid "Create and Edit..."
+msgstr "Oluştur ve düzenle..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:156
+#: code:addons/web_m2x_options/static/src/js/form.js:305
+#, python-format
+msgid "Search More..."
+msgstr "Daha Fazla..."
diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js
index 7342794ea2e5..524197a57392 100644
--- a/web_m2x_options/static/src/js/form.js
+++ b/web_m2x_options/static/src/js/form.js
@@ -67,11 +67,11 @@ openerp.web_m2x_options = function (instance) {
var self = this;
// add options limit used to change number of selections record
// returned.
- if (_.isUndefined(this.view))
- return this._super.apply(this, arguments);
- if (!_.isUndefined(this.view.ir_options['web_m2x_options.limit'])) {
- this.limit = parseInt(this.view.ir_options['web_m2x_options.limit']);
- }
+ if (_.isUndefined(this.view))
+ return this._super.apply(this, arguments);
+ if (!_.isUndefined(this.view.ir_options['web_m2x_options.limit'])) {
+ this.limit = parseInt(this.view.ir_options['web_m2x_options.limit']);
+ }
if (typeof this.options.limit === 'number') {
this.limit = this.options.limit;
@@ -99,8 +99,7 @@ openerp.web_m2x_options = function (instance) {
self.build_context()));
var create_rights;
- if (typeof this.options.create === "undefined" ||
- typeof this.options.create_edit === "undefined") {
+ if (!(self.options && (self.options.no_create || self.options.no_create_edit))) {
create_rights = new instance.web.Model(this.field.relation).call(
"check_access_rights", ["create", false]);
}
@@ -119,7 +118,7 @@ openerp.web_m2x_options = function (instance) {
id: x[0],
};
});
-
+
// Search result value colors
if (self.colors && self.field_color) {
@@ -127,7 +126,7 @@ openerp.web_m2x_options = function (instance) {
for (var index in values) {
value_ids.push(values[index].id);
}
-
+
// RPC request to get field_color from Objects
Objects.query([self.field_color])
.filter([['id', 'in', value_ids]])
@@ -137,7 +136,7 @@ openerp.web_m2x_options = function (instance) {
if (values[index_value].id == objects[index].id) {
// Find value in values by comparing ids
var value = values[index_value];
-
+
// Find color with field value as key
var color = self.colors[objects[index][self.field_color]] || 'black';
value.label = ''+value.label+'';
@@ -171,10 +170,15 @@ openerp.web_m2x_options = function (instance) {
var raw_result = _(data.result).map(function (x) {
return x[1];
});
+ var no_quick_create = (
+ self.options && (self.options.no_create ||
+ self.options.no_quick_create)
+ )
+ var m2x_create_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create'])
+ var m2x_create = self.view.ir_options['web_m2x_options.create'] == "True"
- if ((_.isUndefined(self.options.create) && _.isUndefined(self.view.ir_options['web_m2x_options.create']) && can_create) ||
- (_.isUndefined(self.options.create) && self.view.ir_options['web_m2x_options.create'] == "True") ||
- self.options.create) {
+ if (!no_quick_create && ((m2x_create_undef && can_create) ||
+ m2x_create)) {
if (search_val.length > 0 &&
!_.include(raw_result, search_val)) {
@@ -192,10 +196,15 @@ openerp.web_m2x_options = function (instance) {
}
// create...
+ var no_create_edit = (
+ self.options && (self.options.no_create ||
+ self.options.no_create_edit)
+ )
+ var m2x_create_edit_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create_edit'])
+ var m2x_create_edit = self.view.ir_options['web_m2x_options.create_edit'] == "True"
- if ((_.isUndefined(self.options.create_edit) && _.isUndefined(self.view.ir_options['web_m2x_options.create_edit']) && can_create) ||
- (_.isUndefined(self.options.create) && self.view.ir_options['web_m2x_options.create_edit'] == "True") ||
- self.options.create_edit) {
+ if (!no_create_edit && ((m2x_create_edit_undef && can_create) ||
+ m2x_create_edit)) {
values.push({
label: _t("Create and Edit..."),
@@ -207,7 +216,7 @@ openerp.web_m2x_options = function (instance) {
classname: 'oe_m2o_dropdown_option'
});
}
-
+
// Check if colors specified to wait for RPC
if (!(self.field_color && self.colors)){
def.resolve(values);
@@ -226,28 +235,28 @@ openerp.web_m2x_options = function (instance) {
new instance.web.form.M2ODialog(this).open();
}
},
-
- start: function() {
- this._super.apply(this, arguments);
- return this.get_options();
- },
-
- get_options: function() {
- var self = this;
- if (_.isUndefined(this.view.ir_options_loaded)) {
- this.view.ir_options_loaded = $.Deferred();
- this.view.ir_options = {};
- (new instance.web.Model("ir.config_parameter"))
- .query(["key", "value"]).filter([['key', 'in', OPTIONS]])
- .all().then(function(records) {
- _(records).each(function(record) {
- self.view.ir_options[record.key] = record.value;
- });
- self.view.ir_options_loaded.resolve();
- });
- }
- return this.view.ir_options_loaded;
- },
+
+ start: function() {
+ this._super.apply(this, arguments);
+ return this.get_options();
+ },
+
+ get_options: function() {
+ var self = this;
+ if (_.isUndefined(this.view.ir_options_loaded)) {
+ this.view.ir_options_loaded = $.Deferred();
+ this.view.ir_options = {};
+ (new instance.web.Model("ir.config_parameter"))
+ .query(["key", "value"]).filter([['key', 'in', OPTIONS]])
+ .all().then(function(records) {
+ _(records).each(function(record) {
+ self.view.ir_options[record.key] = record.value;
+ });
+ self.view.ir_options_loaded.resolve();
+ });
+ }
+ return this.view.ir_options_loaded;
+ },
/**
* Call this method to search using a string.
@@ -258,10 +267,10 @@ openerp.web_m2x_options = function (instance) {
// add options limit used to change number of selections record
// returned.
-
- if (!_.isUndefined(this.view.ir_options['web_m2x_options.limit'])) {
- this.limit = parseInt(this.view.ir_options['web_m2x_options.limit']);
- }
+
+ if (!_.isUndefined(this.view.ir_options['web_m2x_options.limit'])) {
+ this.limit = parseInt(this.view.ir_options['web_m2x_options.limit']);
+ }
if (typeof this.options.limit === 'number') {
this.limit = this.options.limit;
@@ -300,10 +309,14 @@ openerp.web_m2x_options = function (instance) {
});
}
// quick create
+ var no_quick_create = (
+ self.options && (self.options.no_create ||
+ self.options.no_quick_create)
+ )
+ var m2x_create_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create'])
+ var m2x_create = self.view.ir_options['web_m2x_options.create'] == "True"
- if ((_.isUndefined(self.options.create) && _.isUndefined(self.view.ir_options['web_m2x_options.create'])) ||
- (_.isUndefined(self.options.create) && self.view.ir_options['web_m2x_options.create'] == 'True') ||
- self.options.create) {
+ if (!no_quick_create && (m2x_create_undef || m2x_create)) {
var raw_result = _(data.result).map(function(x) {return x[1];});
if (search_val.length > 0 && !_.include(raw_result, search_val)) {
@@ -319,10 +332,14 @@ openerp.web_m2x_options = function (instance) {
}
// create...
-
- if ((_.isUndefined(self.options.create_edit === 'undefined') && _.isUndefined(self.view.ir_options['web_m2x_options.create_edit'])) ||
- (_.isUndefined(self.options.create) && self.view.ir_options['web_m2x_options.create_edit'] == 'True') ||
- self.options.create_edit) {
+ var no_create_edit = (
+ self.options && (self.options.no_create ||
+ self.options.no_create_edit)
+ )
+ var m2x_create_edit_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create_edit'])
+ var m2x_create_edit = self.view.ir_options['web_m2x_options.create_edit'] == "True"
+
+ if (!no_create_edit && (m2x_create_edit_undef || m2x_create_edit)) {
values.push({
label: _t("Create and Edit..."),
From c43e9886eea82018a2e08ea7d4320eacbf37038f Mon Sep 17 00:00:00 2001
From: Antonio Espinosa
Date: Wed, 10 Feb 2016 17:05:51 +0100
Subject: [PATCH 119/454] Limit name_search to 160 like Odoo core does
---
web_m2x_options/__openerp__.py | 2 +-
web_m2x_options/static/src/js/form.js | 10 ++++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/web_m2x_options/__openerp__.py b/web_m2x_options/__openerp__.py
index c87994c71a61..8a3331574bce 100644
--- a/web_m2x_options/__openerp__.py
+++ b/web_m2x_options/__openerp__.py
@@ -2,7 +2,7 @@
{
"name": 'web_m2x_options',
- "version": "8.0.0.2",
+ "version": "8.0.0.2.0",
"depends": [
'base',
'web',
diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js
index 524197a57392..9fe51d23b056 100644
--- a/web_m2x_options/static/src/js/form.js
+++ b/web_m2x_options/static/src/js/form.js
@@ -155,9 +155,12 @@ openerp.web_m2x_options = function (instance) {
values.push({
label: _t("Search More..."),
action: function () {
+ // limit = 80 for improving performance, similar
+ // to Odoo implementation here:
+ // https://github.com/odoo/odoo/commit/8c3cdce539d87775b59b3f2d5ceb433f995821bf
dataset.name_search(
search_val, self.build_domain(),
- 'ilike', false).done(function (data) {
+ 'ilike', 80).done(function (data) {
self._search_create_popup("search", data);
});
},
@@ -301,7 +304,10 @@ openerp.web_m2x_options = function (instance) {
values.push({
label: _t("Search More..."),
action: function() {
- dataset.name_search(search_val, self.build_domain(), 'ilike', false).done(function(data) {
+ // limit = 80 for improving performance, similar
+ // to Odoo implementation here:
+ // https://github.com/odoo/odoo/commit/8c3cdce539d87775b59b3f2d5ceb433f995821bf
+ dataset.name_search(search_val, self.build_domain(), 'ilike', 80).done(function(data) {
self._search_create_popup("search", data);
});
},
From af2a37cbf544437d580431c69564c2cfb5b3b34a Mon Sep 17 00:00:00 2001
From: Zakaria Makrelouf
Date: Sun, 11 Sep 2016 12:10:19 +0100
Subject: [PATCH 120/454] Migration of module web_m2x_options. Adapt JS file to
the new JS API and make the module installable [MIG] adapt form.js to the new
API. [FIX] Fix bug mentioned in pull #262. [MIG] Make the module installable.
---
web_m2x_options/README.rst | 1 +
web_m2x_options/__openerp__.py | 7 +-
web_m2x_options/i18n/ar.po | 12 +-
web_m2x_options/i18n/de.po | 12 +-
web_m2x_options/i18n/es.po | 12 +-
web_m2x_options/i18n/fi.po | 12 +-
web_m2x_options/i18n/fr.po | 12 +-
web_m2x_options/i18n/it.po | 12 +-
web_m2x_options/i18n/pt_BR.po | 12 +-
web_m2x_options/i18n/sl.po | 12 +-
web_m2x_options/i18n/tr.po | 12 +-
web_m2x_options/static/src/js/form.js | 225 ++++++++++++++----------
web_m2x_options/static/src/xml/base.xml | 2 +-
13 files changed, 190 insertions(+), 153 deletions(-)
diff --git a/web_m2x_options/README.rst b/web_m2x_options/README.rst
index de0adaac3d33..dff75f05fe73 100644
--- a/web_m2x_options/README.rst
+++ b/web_m2x_options/README.rst
@@ -145,6 +145,7 @@ Contributors
* Holger Brunn
* Nicolas JEUDY
* Yannick Vaucher
+* Zakaria Makrelouf
Maintainer
----------
diff --git a/web_m2x_options/__openerp__.py b/web_m2x_options/__openerp__.py
index 8a3331574bce..94c1a525bd55 100644
--- a/web_m2x_options/__openerp__.py
+++ b/web_m2x_options/__openerp__.py
@@ -2,7 +2,7 @@
{
"name": 'web_m2x_options',
- "version": "8.0.0.2.0",
+ "version": "9.0.1.0.0",
"depends": [
'base',
'web',
@@ -12,7 +12,6 @@
],
'license': 'AGPL-3',
'data': ['views/view.xml'],
- "author": "0k.io,Odoo Community Association (OCA)",
- "installable": True,
- "active": False,
+ "author": "ACSONE SA/NV, 0k.io,Odoo Community Association (OCA)",
+ 'installable': True,
}
diff --git a/web_m2x_options/i18n/ar.po b/web_m2x_options/i18n/ar.po
index 1011622c21a8..124f84ceecdc 100644
--- a/web_m2x_options/i18n/ar.po
+++ b/web_m2x_options/i18n/ar.po
@@ -20,24 +20,24 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:191
-#: code:addons/web_m2x_options/static/src/js/form.js:330
+#: code:addons/web_m2x_options/static/src/js/form.js:219
+#: code:addons/web_m2x_options/static/src/js/form.js:373
#, python-format
msgid "Create \"%s\""
msgstr "إنشاء \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:213
-#: code:addons/web_m2x_options/static/src/js/form.js:351
+#: code:addons/web_m2x_options/static/src/js/form.js:237
+#: code:addons/web_m2x_options/static/src/js/form.js:392
#, python-format
msgid "Create and Edit..."
msgstr "إنشاء وتحرير ..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:156
-#: code:addons/web_m2x_options/static/src/js/form.js:305
+#: code:addons/web_m2x_options/static/src/js/form.js:188
+#: code:addons/web_m2x_options/static/src/js/form.js:349
#, python-format
msgid "Search More..."
msgstr "البحث عن المزيد ..."
diff --git a/web_m2x_options/i18n/de.po b/web_m2x_options/i18n/de.po
index 112e2b911061..40eb8cacde07 100644
--- a/web_m2x_options/i18n/de.po
+++ b/web_m2x_options/i18n/de.po
@@ -20,24 +20,24 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:191
-#: code:addons/web_m2x_options/static/src/js/form.js:330
+#: code:addons/web_m2x_options/static/src/js/form.js:219
+#: code:addons/web_m2x_options/static/src/js/form.js:373
#, python-format
msgid "Create \"%s\""
msgstr "Anlegen \"%s"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:213
-#: code:addons/web_m2x_options/static/src/js/form.js:351
+#: code:addons/web_m2x_options/static/src/js/form.js:237
+#: code:addons/web_m2x_options/static/src/js/form.js:392
#, python-format
msgid "Create and Edit..."
msgstr "Anlegen und Bearbeiten"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:156
-#: code:addons/web_m2x_options/static/src/js/form.js:305
+#: code:addons/web_m2x_options/static/src/js/form.js:188
+#: code:addons/web_m2x_options/static/src/js/form.js:349
#, python-format
msgid "Search More..."
msgstr "Suche weitere..."
diff --git a/web_m2x_options/i18n/es.po b/web_m2x_options/i18n/es.po
index 7a4764bae86a..bd3b1e51bc9d 100644
--- a/web_m2x_options/i18n/es.po
+++ b/web_m2x_options/i18n/es.po
@@ -20,24 +20,24 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:191
-#: code:addons/web_m2x_options/static/src/js/form.js:330
+#: code:addons/web_m2x_options/static/src/js/form.js:219
+#: code:addons/web_m2x_options/static/src/js/form.js:373
#, python-format
msgid "Create \"%s\""
msgstr "Crear \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:213
-#: code:addons/web_m2x_options/static/src/js/form.js:351
+#: code:addons/web_m2x_options/static/src/js/form.js:237
+#: code:addons/web_m2x_options/static/src/js/form.js:392
#, python-format
msgid "Create and Edit..."
msgstr "Crear y editar..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:156
-#: code:addons/web_m2x_options/static/src/js/form.js:305
+#: code:addons/web_m2x_options/static/src/js/form.js:188
+#: code:addons/web_m2x_options/static/src/js/form.js:349
#, python-format
msgid "Search More..."
msgstr "Buscar más..."
diff --git a/web_m2x_options/i18n/fi.po b/web_m2x_options/i18n/fi.po
index 9dab4ae40247..b374d7eb9458 100644
--- a/web_m2x_options/i18n/fi.po
+++ b/web_m2x_options/i18n/fi.po
@@ -20,24 +20,24 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:191
-#: code:addons/web_m2x_options/static/src/js/form.js:330
+#: code:addons/web_m2x_options/static/src/js/form.js:219
+#: code:addons/web_m2x_options/static/src/js/form.js:373
#, python-format
msgid "Create \"%s\""
msgstr "Luo \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:213
-#: code:addons/web_m2x_options/static/src/js/form.js:351
+#: code:addons/web_m2x_options/static/src/js/form.js:237
+#: code:addons/web_m2x_options/static/src/js/form.js:392
#, python-format
msgid "Create and Edit..."
msgstr "Luo ja muokkaa..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:156
-#: code:addons/web_m2x_options/static/src/js/form.js:305
+#: code:addons/web_m2x_options/static/src/js/form.js:188
+#: code:addons/web_m2x_options/static/src/js/form.js:349
#, python-format
msgid "Search More..."
msgstr "Hae lisää..."
diff --git a/web_m2x_options/i18n/fr.po b/web_m2x_options/i18n/fr.po
index 448e0f4684ff..3be5ae233eab 100644
--- a/web_m2x_options/i18n/fr.po
+++ b/web_m2x_options/i18n/fr.po
@@ -20,24 +20,24 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:191
-#: code:addons/web_m2x_options/static/src/js/form.js:330
+#: code:addons/web_m2x_options/static/src/js/form.js:219
+#: code:addons/web_m2x_options/static/src/js/form.js:373
#, python-format
msgid "Create \"%s\""
msgstr "Creer \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:213
-#: code:addons/web_m2x_options/static/src/js/form.js:351
+#: code:addons/web_m2x_options/static/src/js/form.js:237
+#: code:addons/web_m2x_options/static/src/js/form.js:392
#, python-format
msgid "Create and Edit..."
msgstr "Créer et modifier..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:156
-#: code:addons/web_m2x_options/static/src/js/form.js:305
+#: code:addons/web_m2x_options/static/src/js/form.js:188
+#: code:addons/web_m2x_options/static/src/js/form.js:349
#, python-format
msgid "Search More..."
msgstr "Rechercher plus..."
diff --git a/web_m2x_options/i18n/it.po b/web_m2x_options/i18n/it.po
index ce21776cee13..c8db1568fdf7 100644
--- a/web_m2x_options/i18n/it.po
+++ b/web_m2x_options/i18n/it.po
@@ -32,24 +32,24 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:191
-#: code:addons/web_m2x_options/static/src/js/form.js:330
+#: code:addons/web_m2x_options/static/src/js/form.js:219
+#: code:addons/web_m2x_options/static/src/js/form.js:373
#, python-format
msgid "Create \"%s\""
msgstr "Crea \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:213
-#: code:addons/web_m2x_options/static/src/js/form.js:351
+#: code:addons/web_m2x_options/static/src/js/form.js:237
+#: code:addons/web_m2x_options/static/src/js/form.js:392
#, python-format
msgid "Create and Edit..."
msgstr "Crea e Modifica..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:156
-#: code:addons/web_m2x_options/static/src/js/form.js:305
+#: code:addons/web_m2x_options/static/src/js/form.js:188
+#: code:addons/web_m2x_options/static/src/js/form.js:349
#, python-format
msgid "Search More..."
msgstr "Cerca altro..."
diff --git a/web_m2x_options/i18n/pt_BR.po b/web_m2x_options/i18n/pt_BR.po
index 8074af4c14d7..cf28995e3eed 100644
--- a/web_m2x_options/i18n/pt_BR.po
+++ b/web_m2x_options/i18n/pt_BR.po
@@ -20,24 +20,24 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:191
-#: code:addons/web_m2x_options/static/src/js/form.js:330
+#: code:addons/web_m2x_options/static/src/js/form.js:219
+#: code:addons/web_m2x_options/static/src/js/form.js:373
#, python-format
msgid "Create \"%s\""
msgstr "Criar \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:213
-#: code:addons/web_m2x_options/static/src/js/form.js:351
+#: code:addons/web_m2x_options/static/src/js/form.js:237
+#: code:addons/web_m2x_options/static/src/js/form.js:392
#, python-format
msgid "Create and Edit..."
msgstr "Criar e editar.."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:156
-#: code:addons/web_m2x_options/static/src/js/form.js:305
+#: code:addons/web_m2x_options/static/src/js/form.js:188
+#: code:addons/web_m2x_options/static/src/js/form.js:349
#, python-format
msgid "Search More..."
msgstr "Buscar mais..."
diff --git a/web_m2x_options/i18n/sl.po b/web_m2x_options/i18n/sl.po
index c63f36ed9d72..7192762e128e 100644
--- a/web_m2x_options/i18n/sl.po
+++ b/web_m2x_options/i18n/sl.po
@@ -20,24 +20,24 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:191
-#: code:addons/web_m2x_options/static/src/js/form.js:330
+#: code:addons/web_m2x_options/static/src/js/form.js:219
+#: code:addons/web_m2x_options/static/src/js/form.js:373
#, python-format
msgid "Create \"%s\""
msgstr "Ustvari \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:213
-#: code:addons/web_m2x_options/static/src/js/form.js:351
+#: code:addons/web_m2x_options/static/src/js/form.js:237
+#: code:addons/web_m2x_options/static/src/js/form.js:392
#, python-format
msgid "Create and Edit..."
msgstr "Ustvari in urejaj..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:156
-#: code:addons/web_m2x_options/static/src/js/form.js:305
+#: code:addons/web_m2x_options/static/src/js/form.js:188
+#: code:addons/web_m2x_options/static/src/js/form.js:349
#, python-format
msgid "Search More..."
msgstr "Poišči več..."
diff --git a/web_m2x_options/i18n/tr.po b/web_m2x_options/i18n/tr.po
index c9418f2d1c2f..2b9f46fdd2ee 100644
--- a/web_m2x_options/i18n/tr.po
+++ b/web_m2x_options/i18n/tr.po
@@ -21,24 +21,24 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:191
-#: code:addons/web_m2x_options/static/src/js/form.js:330
+#: code:addons/web_m2x_options/static/src/js/form.js:219
+#: code:addons/web_m2x_options/static/src/js/form.js:373
#, python-format
msgid "Create \"%s\""
msgstr "Oluştur \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:213
-#: code:addons/web_m2x_options/static/src/js/form.js:351
+#: code:addons/web_m2x_options/static/src/js/form.js:237
+#: code:addons/web_m2x_options/static/src/js/form.js:392
#, python-format
msgid "Create and Edit..."
msgstr "Oluştur ve düzenle..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:156
-#: code:addons/web_m2x_options/static/src/js/form.js:305
+#: code:addons/web_m2x_options/static/src/js/form.js:188
+#: code:addons/web_m2x_options/static/src/js/form.js:349
#, python-format
msgid "Search More..."
msgstr "Daha Fazla..."
diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js
index 9fe51d23b056..8e97ad3ecb1d 100644
--- a/web_m2x_options/static/src/js/form.js
+++ b/web_m2x_options/static/src/js/form.js
@@ -1,12 +1,17 @@
-/*global openerp, _, $ */
-
-openerp.web_m2x_options = function (instance) {
+/* Copyright 2016 0k.io,ACSONE SA/NV
+ * * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
+odoo.define('web_m2x_options.web_m2x_options', function (require) {
"use strict";
- var QWeb = instance.web.qweb,
- _t = instance.web._t,
- _lt = instance.web._lt;
+ var $ = require("$");
+ var core = require('web.core'),
+ data = require('web.data'),
+ Dialog = require('web.Dialog'),
+ Model = require('web.Model'),
+ form_relational = require('web.form_relational'),
+ _ = require('_'),
+ _t = core._t;
var OPTIONS = ['web_m2x_options.create',
'web_m2x_options.create_edit',
@@ -14,7 +19,40 @@ openerp.web_m2x_options = function (instance) {
'web_m2x_options.search_more',
'web_m2x_options.m2o_dialog',];
- instance.web.form.FieldMany2One = instance.web.form.FieldMany2One.extend({
+ var M2ODialog = Dialog.extend({
+ template: "M2ODialog",
+ init: function(parent) {
+ this.name = parent.string;
+ this._super(parent, {
+ title: _.str.sprintf(_t("Create a %s"), parent.string),
+ size: 'medium',
+ buttons: [
+ {text: _t('Create'), classes: 'btn-primary', click: function() {
+ if (this.$("input").val() !== ''){
+ this.getParent()._quick_create(this.$("input").val());
+ this.close();
+ } else {
+ e.preventDefault();
+ this.$("input").focus();
+ }
+ }},
+
+ {text: _t('Create and edit'), classes: 'btn-primary', close: true, click: function() {
+ this.getParent()._search_create_popup("form", undefined, this.getParent()._create_context(this.$("input").val()));
+ }},
+
+ {text: _t('Cancel'), close: true}
+ ]
+ });
+ },
+ start: function() {
+ var text = _.str.sprintf(_t("You are creating a new %s, are you sure it does not exist yet?"), this.name);
+ this.$("p").text(text);
+ this.$("input").val(this.getParent().$input.val());
+ },
+ });
+
+ form_relational.FieldMany2One.include({
start: function() {
this._super.apply(this, arguments);
@@ -26,7 +64,7 @@ openerp.web_m2x_options = function (instance) {
if (!_.isUndefined(this.view) && _.isUndefined(this.view.ir_options_loaded)) {
this.view.ir_options_loaded = $.Deferred();
this.view.ir_options = {};
- (new instance.web.Model("ir.config_parameter"))
+ (new Model("ir.config_parameter"))
.query(["key", "value"]).filter([['key', 'in', OPTIONS]])
.all().then(function(records) {
_(records).each(function(record) {
@@ -57,12 +95,12 @@ openerp.web_m2x_options = function (instance) {
if(this.is_option_set(this.options.m2o_dialog) ||
_.isUndefined(this.options.m2o_dialog) && this.is_option_set(this.view.ir_options['web_m2x_options.m2o_dialog']) ||
this.can_create && _.isUndefined(this.options.m2o_dialog) && _.isUndefined(this.view.ir_options['web_m2x_options.m2o_dialog'])) {
- new instance.web.form.M2ODialog(this).open();
+ new M2ODialog(this).open();
}
},
get_search_result: function (search_val) {
- var Objects = new instance.web.Model(this.field.relation);
+ var Objects = new Model(this.field.relation);
var def = $.Deferred();
var self = this;
// add options limit used to change number of selections record
@@ -77,30 +115,25 @@ openerp.web_m2x_options = function (instance) {
this.limit = this.options.limit;
}
- // add options search_more to force enable or disable search_more button
- if (this.is_option_set(this.options.search_more) || _.isUndefined(this.options.search_more) && this.is_option_set(self.view.ir_options['web_m2x_options.search_more'])) {
- this.search_more = true
- }
-
// add options field_color and colors to color item(s) depending on field_color value
this.field_color = this.options.field_color
this.colors = this.options.colors
- var dataset = new instance.web.DataSet(this, this.field.relation,
+ var dataset = new data.DataSet(this, this.field.relation,
self.build_context());
var blacklist = this.get_search_blacklist();
this.last_query = search_val;
var search_result = this.orderer.add(dataset.name_search(
search_val,
- new instance.web.CompoundDomain(
+ new data.CompoundDomain(
self.build_domain(), [["id", "not in", blacklist]]),
'ilike', this.limit + 1,
self.build_context()));
var create_rights;
- if (!(self.options && (self.options.no_create || self.options.no_create_edit))) {
- create_rights = new instance.web.Model(this.field.relation).call(
+ if (!(self.options && (self.is_option_set(self.options.create) || self.is_option_set(self.options.create_edit)))) {
+ create_rights = new Model(this.field.relation).call(
"check_access_rights", ["create", false]);
}
@@ -120,13 +153,11 @@ openerp.web_m2x_options = function (instance) {
});
// Search result value colors
-
if (self.colors && self.field_color) {
var value_ids = [];
for (var index in values) {
value_ids.push(values[index].id);
}
-
// RPC request to get field_color from Objects
Objects.query([self.field_color])
.filter([['id', 'in', value_ids]])
@@ -136,7 +167,6 @@ openerp.web_m2x_options = function (instance) {
if (values[index_value].id == objects[index].id) {
// Find value in values by comparing ids
var value = values[index_value];
-
// Find color with field value as key
var color = self.colors[objects[index][self.field_color]] || 'black';
value.label = ''+value.label+'';
@@ -149,8 +179,11 @@ openerp.web_m2x_options = function (instance) {
}
// search more... if more results that max
+ var can_search_more = (self.options && self.is_option_set(self.options.search_more)),
+ search_more_undef = _.isUndefined(self.options.search_more) && _.isUndefined(self.view.ir_options['web_m2x_options.search_more']),
+ search_more = self.is_option_set(self.view.ir_options['web_m2x_options.search_more']);
- if (values.length > self.limit || self.search_more) {
+ if (values.length > self.limit && (can_search_more || search_more_undef || search_more)) {
values = values.slice(0, self.limit);
values.push({
label: _t("Search More..."),
@@ -164,7 +197,7 @@ openerp.web_m2x_options = function (instance) {
self._search_create_popup("search", data);
});
},
- classname: 'oe_m2o_dropdown_option'
+ classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
});
}
@@ -173,16 +206,12 @@ openerp.web_m2x_options = function (instance) {
var raw_result = _(data.result).map(function (x) {
return x[1];
});
- var no_quick_create = (
- self.options && (self.options.no_create ||
- self.options.no_quick_create)
- )
- var m2x_create_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create'])
- var m2x_create = self.view.ir_options['web_m2x_options.create'] == "True"
-
- if (!no_quick_create && ((m2x_create_undef && can_create) ||
- m2x_create)) {
-
+ var quick_create = self.is_option_set(self.options.create) || self.is_option_set(self.options.quick_create),
+ quick_create_undef = _.isUndefined(self.options.create) && _.isUndefined(self.options.quick_create),
+ m2x_create_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create']),
+ m2x_create = self.is_option_set(self.view.ir_options['web_m2x_options.create']);
+ var show_create = (!self.options && (m2x_create_undef || m2x_create)) || (self.options && (quick_create || (quick_create_undef && (m2x_create_undef || m2x_create))));
+ if (show_create){
if (search_val.length > 0 &&
!_.include(raw_result, search_val)) {
@@ -193,22 +222,18 @@ openerp.web_m2x_options = function (instance) {
action: function () {
self._quick_create(search_val);
},
- classname: 'oe_m2o_dropdown_option'
+ classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
});
}
}
// create...
- var no_create_edit = (
- self.options && (self.options.no_create ||
- self.options.no_create_edit)
- )
- var m2x_create_edit_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create_edit'])
- var m2x_create_edit = self.view.ir_options['web_m2x_options.create_edit'] == "True"
-
- if (!no_create_edit && ((m2x_create_edit_undef && can_create) ||
- m2x_create_edit)) {
-
+ var create_edit = self.is_option_set(self.options.create) || self.is_option_set(self.options.create_edit),
+ create_edit_undef = _.isUndefined(self.options.create) && _.isUndefined(self.options.create_edit),
+ m2x_create_edit_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create_edit']),
+ m2x_create_edit = self.is_option_set(self.view.ir_options['web_m2x_options.create_edit']);
+ var show_create_edit = (!self.options && (m2x_create_edit_undef || m2x_create_edit)) || (self.options && (create_edit || (create_edit_undef && (m2x_create_edit_undef || m2x_create_edit))));
+ if (show_create_edit){
values.push({
label: _t("Create and Edit..."),
action: function () {
@@ -216,10 +241,9 @@ openerp.web_m2x_options = function (instance) {
"form", undefined,
self._create_context(search_val));
},
- classname: 'oe_m2o_dropdown_option'
+ classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
});
}
-
// Check if colors specified to wait for RPC
if (!(self.field_color && self.colors)){
def.resolve(values);
@@ -230,12 +254,19 @@ openerp.web_m2x_options = function (instance) {
}
});
- instance.web.form.FieldMany2ManyTags.include({
-
+ form_relational.FieldMany2ManyTags.include({
+ events: {
+ 'click .o_delete': function(e) {
+ this.remove_id($(e.target).parent().data('id'));
+ },
+ 'click .badge': 'open_badge',
+ 'mousedown .o_colorpicker span': 'update_color',
+ 'focusout .o_colorpicker': 'close_color_picker',
+ },
show_error_displayer: function () {
if ((typeof this.options.m2o_dialog === 'undefined' && this.can_create) ||
this.options.m2o_dialog) {
- new instance.web.form.M2ODialog(this).open();
+ new M2ODialog(this).open();
}
},
@@ -249,7 +280,7 @@ openerp.web_m2x_options = function (instance) {
if (_.isUndefined(this.view.ir_options_loaded)) {
this.view.ir_options_loaded = $.Deferred();
this.view.ir_options = {};
- (new instance.web.Model("ir.config_parameter"))
+ (new Model("ir.config_parameter"))
.query(["key", "value"]).filter([['key', 'in', OPTIONS]])
.all().then(function(records) {
_(records).each(function(record) {
@@ -261,6 +292,20 @@ openerp.web_m2x_options = function (instance) {
return this.view.ir_options_loaded;
},
+ is_option_set: function(option) {
+ if (_.isUndefined(option)) {
+ return false
+ }
+ var is_string = typeof option === 'string'
+ var is_bool = typeof option === 'boolean'
+ if (is_string) {
+ return option === 'true' || option === 'True'
+ } else if (is_bool) {
+ return option
+ }
+ return false
+ },
+
/**
* Call this method to search using a string.
*/
@@ -279,12 +324,12 @@ openerp.web_m2x_options = function (instance) {
this.limit = this.options.limit;
}
- var dataset = new instance.web.DataSet(this, this.field.relation, self.build_context());
+ var dataset = new data.DataSet(this, this.field.relation, self.build_context());
var blacklist = this.get_search_blacklist();
this.last_query = search_val;
return this.orderer.add(dataset.name_search(
- search_val, new instance.web.CompoundDomain(self.build_domain(), [["id", "not in", blacklist]]),
+ search_val, new data.CompoundDomain(self.build_domain(), [["id", "not in", blacklist]]),
'ilike', this.limit + 1, self.build_context())).then(function(data) {
self.last_search = data;
// possible selections for the m2o
@@ -304,6 +349,7 @@ openerp.web_m2x_options = function (instance) {
values.push({
label: _t("Search More..."),
action: function() {
+
// limit = 80 for improving performance, similar
// to Odoo implementation here:
// https://github.com/odoo/odoo/commit/8c3cdce539d87775b59b3f2d5ceb433f995821bf
@@ -311,18 +357,16 @@ openerp.web_m2x_options = function (instance) {
self._search_create_popup("search", data);
});
},
- classname: 'oe_m2o_dropdown_option'
+ classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
});
}
// quick create
- var no_quick_create = (
- self.options && (self.options.no_create ||
- self.options.no_quick_create)
- )
- var m2x_create_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create'])
- var m2x_create = self.view.ir_options['web_m2x_options.create'] == "True"
-
- if (!no_quick_create && (m2x_create_undef || m2x_create)) {
+ var quick_create = self.is_option_set(self.options.create) || self.is_option_set(self.options.quick_create),
+ quick_create_undef = _.isUndefined(self.options.create) && _.isUndefined(self.options.quick_create),
+ m2x_create_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create']),
+ m2x_create = self.is_option_set(self.view.ir_options['web_m2x_options.create']);
+ var show_create = (!self.options && (m2x_create_undef || m2x_create)) || (self.options && (quick_create || (quick_create_undef && (m2x_create_undef || m2x_create))));
+ if (show_create){
var raw_result = _(data.result).map(function(x) {return x[1];});
if (search_val.length > 0 && !_.include(raw_result, search_val)) {
@@ -332,27 +376,25 @@ openerp.web_m2x_options = function (instance) {
action: function() {
self._quick_create(search_val);
},
- classname: 'oe_m2o_dropdown_option'
+ classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
});
}
}
// create...
- var no_create_edit = (
- self.options && (self.options.no_create ||
- self.options.no_create_edit)
- )
- var m2x_create_edit_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create_edit'])
- var m2x_create_edit = self.view.ir_options['web_m2x_options.create_edit'] == "True"
-
- if (!no_create_edit && (m2x_create_edit_undef || m2x_create_edit)) {
+ var create_edit = self.is_option_set(self.options.create) || self.is_option_set(self.options.create_edit),
+ create_edit_undef = _.isUndefined(self.options.create) && _.isUndefined(self.options.create_edit),
+ m2x_create_edit_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create_edit']),
+ m2x_create_edit = self.is_option_set(self.view.ir_options['web_m2x_options.create_edit']);
+ var show_create_edit = (!self.options && (m2x_create_edit_undef || m2x_create_edit)) || (self.options && (create_edit || (create_edit_undef && (m2x_create_edit_undef || m2x_create_edit))));
+ if (show_create_edit){
values.push({
label: _t("Create and Edit..."),
action: function() {
self._search_create_popup("form", undefined, self._create_context(search_val));
},
- classname: 'oe_m2o_dropdown_option'
+ classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
});
}
@@ -360,29 +402,24 @@ openerp.web_m2x_options = function (instance) {
})
},
- render_value: function()
- {
+ open_badge: function(ev){
var self = this;
- return jQuery.when(this._super.apply(this, arguments))
- .then(function()
- {
- if(self.options.open)
- {
- self.$el.find('.oe_tag')
- .css('cursor', 'pointer')
- .click(function(e)
- {
- var id = parseInt(jQuery(this).attr('data-id'));
- self.do_action({
- type: 'ir.actions.act_window',
- res_model: self.field.relation,
- views: [[false, 'form']],
- res_id: id,
- });
+ var open = (self.options && self.is_option_set(self.options.open));
+ if(open){
+ self.mutex.exec(function(){
+ var id = parseInt($(ev.handleObj.selector).attr('data-id'));
+ self.do_action({
+ type: 'ir.actions.act_window',
+ res_model: self.field.relation,
+ views: [[false, 'form']],
+ res_id: id,
+ target: "new"
});
- }
- });
+ }.bind(this));
+ }else{
+ self.open_color_picker(ev);
+ }
},
- });
-};
+ });
+});
diff --git a/web_m2x_options/static/src/xml/base.xml b/web_m2x_options/static/src/xml/base.xml
index 9fbf425eaadc..8b9421d190ac 100644
--- a/web_m2x_options/static/src/xml/base.xml
+++ b/web_m2x_options/static/src/xml/base.xml
@@ -6,7 +6,7 @@
-
+
jQuery(this).attr('t-att-data-id', 'el[0]');
From 3a0c10a8580b623addebd63d982636ef5b8eebf0 Mon Sep 17 00:00:00 2001
From: "Laurent Mignon (ACSONE)"
Date: Mon, 24 Oct 2016 16:10:19 +0200
Subject: [PATCH 121/454] Makes the module compatible with Odoo community
---
web_m2x_options/static/src/js/form.js | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js
index 8e97ad3ecb1d..f2a281725b4b 100644
--- a/web_m2x_options/static/src/js/form.js
+++ b/web_m2x_options/static/src/js/form.js
@@ -19,6 +19,11 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
'web_m2x_options.search_more',
'web_m2x_options.m2o_dialog',];
+ // In odoo 9.c FielMany2One is not exposed by form_relational
+ // To bypass this limitation we use the widget registry to get the
+ // reference to the FielMany2One widget.
+ var FieldMany2One = core.form_widget_registry.get('many2one');
+
var M2ODialog = Dialog.extend({
template: "M2ODialog",
init: function(parent) {
@@ -52,7 +57,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
},
});
- form_relational.FieldMany2One.include({
+ FieldMany2One.include({
start: function() {
this._super.apply(this, arguments);
@@ -188,12 +193,12 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
values.push({
label: _t("Search More..."),
action: function () {
- // limit = 80 for improving performance, similar
+ // limit = 160 for improving performance, similar
// to Odoo implementation here:
- // https://github.com/odoo/odoo/commit/8c3cdce539d87775b59b3f2d5ceb433f995821bf
+ // https://github.com/odoo/odoo/blob/feeac2a4f1cd777770dd2b42534904ac71f23e46/addons/web/static/src/js/views/form_common.js#L213
dataset.name_search(
search_val, self.build_domain(),
- 'ilike', 80).done(function (data) {
+ 'ilike', 160).done(function (data) {
self._search_create_popup("search", data);
});
},
From 1368eb03c9d0f2254b685f3b83f810d1a4d74aed Mon Sep 17 00:00:00 2001
From: Zakaria Makrelouf
Date: Thu, 2 Feb 2017 13:30:29 +0100
Subject: [PATCH 122/454] web_m2x_options:
s/ev.handleObj.selector/currentTarget * many2many with `options={'open':
True}` it always open the first element with this fix it will open the right
one
---
web_m2x_options/static/src/js/form.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js
index f2a281725b4b..4b8d0ad13eea 100644
--- a/web_m2x_options/static/src/js/form.js
+++ b/web_m2x_options/static/src/js/form.js
@@ -412,7 +412,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
var open = (self.options && self.is_option_set(self.options.open));
if(open){
self.mutex.exec(function(){
- var id = parseInt($(ev.handleObj.selector).attr('data-id'));
+ var id = parseInt($(ev.currentTarget).data('id'));
self.do_action({
type: 'ir.actions.act_window',
res_model: self.field.relation,
From f638b430baa8086790ae7944ab9c44cf44c92135 Mon Sep 17 00:00:00 2001
From: Jairo Llopis
Date: Wed, 8 Mar 2017 19:19:19 +0100
Subject: [PATCH 123/454] Fix Qweb templates. (#561)
* [FIX][web_m2x_options] Fix Qweb templates.
They were trying to replace non-existing elements, and this was being logged to console:
Can't find "a.oe_m2o_cm_button" when extending template FieldMany2One
Can't find "span.badge" when extending template FieldMany2ManyTag
* Raise version correctly.
* [FIX] Make many2many_tags tag deletion work again
* Correct replacement of event
Instead of overwriting all events from upstream widget, better just overwrite the one you need and inherit the rest.
---
web_m2x_options/README.rst | 3 +-
web_m2x_options/__openerp__.py | 5 +-
web_m2x_options/i18n/ar.po | 66 +++++++++++++++----
web_m2x_options/i18n/de.po | 69 ++++++++++++++++----
web_m2x_options/i18n/es.po | 66 +++++++++++++++----
web_m2x_options/i18n/fi.po | 66 +++++++++++++++----
web_m2x_options/i18n/fr.po | 66 +++++++++++++++----
web_m2x_options/i18n/hr.po | 86 +++++++++++++++++++++++++
web_m2x_options/i18n/it.po | 78 +++++++++++++++-------
web_m2x_options/i18n/nl_NL.po | 85 ++++++++++++++++++++++++
web_m2x_options/i18n/pt_BR.po | 68 +++++++++++++++----
web_m2x_options/i18n/sl.po | 66 +++++++++++++++----
web_m2x_options/i18n/tr.po | 67 +++++++++++++++----
web_m2x_options/static/src/js/form.js | 10 +--
web_m2x_options/static/src/xml/base.xml | 16 ++---
15 files changed, 677 insertions(+), 140 deletions(-)
create mode 100644 web_m2x_options/i18n/hr.po
create mode 100644 web_m2x_options/i18n/nl_NL.po
diff --git a/web_m2x_options/README.rst b/web_m2x_options/README.rst
index dff75f05fe73..98cefc3c2dc6 100644
--- a/web_m2x_options/README.rst
+++ b/web_m2x_options/README.rst
@@ -116,7 +116,7 @@ Your XML form view definition could contain::
Known issues
============
-Double check that you have no inherited view that remove ``options`` you set on a field !
+Double check that you have no inherited view that remove ``options`` you set on a field !
If nothing works, add a debugger in the first line of ``get_search_result method`` and enable debug mode in Odoo. When you write something in a many2one field, javascript debugger should pause. If not verify your installation.
Roadmap
@@ -146,6 +146,7 @@ Contributors
* Nicolas JEUDY
* Yannick Vaucher
* Zakaria Makrelouf
+* Jairo Llopis
Maintainer
----------
diff --git a/web_m2x_options/__openerp__.py b/web_m2x_options/__openerp__.py
index 94c1a525bd55..7206c3ca0331 100644
--- a/web_m2x_options/__openerp__.py
+++ b/web_m2x_options/__openerp__.py
@@ -2,7 +2,7 @@
{
"name": 'web_m2x_options',
- "version": "9.0.1.0.0",
+ "version": "9.0.1.1.0",
"depends": [
'base',
'web',
@@ -12,6 +12,7 @@
],
'license': 'AGPL-3',
'data': ['views/view.xml'],
- "author": "ACSONE SA/NV, 0k.io,Odoo Community Association (OCA)",
+ "author": "ACSONE SA/NV, 0k.io, Tecnativa, "
+ "Odoo Community Association (OCA)",
'installable': True,
}
diff --git a/web_m2x_options/i18n/ar.po b/web_m2x_options/i18n/ar.po
index 124f84ceecdc..6253ba90233d 100644
--- a/web_m2x_options/i18n/ar.po
+++ b/web_m2x_options/i18n/ar.po
@@ -3,15 +3,15 @@
# * web_m2x_options
#
# Translators:
-# SaFi J. , 2015
+# OCA Transbot , 2017
msgid ""
msgstr ""
-"Project-Id-Version: web (8.0)\n"
+"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-26 02:05+0000\n"
-"PO-Revision-Date: 2015-12-16 17:30+0000\n"
-"Last-Translator: SaFi J. \n"
-"Language-Team: Arabic (http://www.transifex.com/oca/OCA-web-8-0/language/ar/)\n"
+"POT-Creation-Date: 2018-01-03 03:50+0000\n"
+"PO-Revision-Date: 2018-01-03 03:50+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -20,24 +20,66 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:219
-#: code:addons/web_m2x_options/static/src/js/form.js:373
+#: code:addons/web_m2x_options/static/src/xml/base.xml:8
+#, python-format
+msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:47
+#, python-format
+msgid "Cancel"
+msgstr "إلغاء"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:33
+#, python-format
+msgid "Create"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:232
+#: code:addons/web_m2x_options/static/src/js/form.js:382
#, python-format
msgid "Create \"%s\""
msgstr "إنشاء \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:237
-#: code:addons/web_m2x_options/static/src/js/form.js:392
+#: code:addons/web_m2x_options/static/src/js/form.js:30
+#, python-format
+msgid "Create a %s"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:250
+#: code:addons/web_m2x_options/static/src/js/form.js:401
#, python-format
msgid "Create and Edit..."
msgstr "إنشاء وتحرير ..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:188
-#: code:addons/web_m2x_options/static/src/js/form.js:349
+#: code:addons/web_m2x_options/static/src/js/form.js:43
+#, python-format
+msgid "Create and edit"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:201
+#: code:addons/web_m2x_options/static/src/js/form.js:358
#, python-format
msgid "Search More..."
msgstr "البحث عن المزيد ..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:52
+#, python-format
+msgid "You are creating a new %s, are you sure it does not exist yet?"
+msgstr ""
diff --git a/web_m2x_options/i18n/de.po b/web_m2x_options/i18n/de.po
index 40eb8cacde07..da119936d9a9 100644
--- a/web_m2x_options/i18n/de.po
+++ b/web_m2x_options/i18n/de.po
@@ -3,15 +3,16 @@
# * web_m2x_options
#
# Translators:
-# Rudolf Schnapka , 2016
+# OCA Transbot , 2017
+# Rudolf Schnapka , 2018
msgid ""
msgstr ""
-"Project-Id-Version: web (8.0)\n"
+"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-26 02:05+0000\n"
-"PO-Revision-Date: 2016-01-18 20:15+0000\n"
-"Last-Translator: Rudolf Schnapka \n"
-"Language-Team: German (http://www.transifex.com/oca/OCA-web-8-0/language/de/)\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"
@@ -20,24 +21,68 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:219
-#: code:addons/web_m2x_options/static/src/js/form.js:373
+#: code:addons/web_m2x_options/static/src/xml/base.xml:8
+#, python-format
+msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgstr "!(widget.options.no_open || widget.options.no_open_edit)"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:47
+#, python-format
+msgid "Cancel"
+msgstr "Abbrechen"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:33
+#, python-format
+msgid "Create"
+msgstr "Anlegen"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:232
+#: code:addons/web_m2x_options/static/src/js/form.js:382
#, python-format
msgid "Create \"%s\""
msgstr "Anlegen \"%s"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:237
-#: code:addons/web_m2x_options/static/src/js/form.js:392
+#: code:addons/web_m2x_options/static/src/js/form.js:30
+#, python-format
+msgid "Create a %s"
+msgstr "Eine %s anlegen"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:250
+#: code:addons/web_m2x_options/static/src/js/form.js:401
#, python-format
msgid "Create and Edit..."
msgstr "Anlegen und Bearbeiten"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:188
-#: code:addons/web_m2x_options/static/src/js/form.js:349
+#: code:addons/web_m2x_options/static/src/js/form.js:43
+#, python-format
+msgid "Create and edit"
+msgstr "Anlegen und bearbeiten"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:201
+#: code:addons/web_m2x_options/static/src/js/form.js:358
#, python-format
msgid "Search More..."
msgstr "Suche weitere..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:52
+#, python-format
+msgid "You are creating a new %s, are you sure it does not exist yet?"
+msgstr ""
+"Sie legen eine neue %s an, sind Sie sicher, dass diese nicht bereits "
+"vorhanden ist?"
diff --git a/web_m2x_options/i18n/es.po b/web_m2x_options/i18n/es.po
index bd3b1e51bc9d..0c2c9feb215b 100644
--- a/web_m2x_options/i18n/es.po
+++ b/web_m2x_options/i18n/es.po
@@ -3,15 +3,15 @@
# * web_m2x_options
#
# Translators:
-# Pedro M. Baeza , 2015
+# OCA Transbot , 2017
msgid ""
msgstr ""
-"Project-Id-Version: web (8.0)\n"
+"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-26 02:05+0000\n"
-"PO-Revision-Date: 2015-11-07 11:28+0000\n"
-"Last-Translator: Pedro M. Baeza \n"
-"Language-Team: Spanish (http://www.transifex.com/oca/OCA-web-8-0/language/es/)\n"
+"POT-Creation-Date: 2018-01-03 03:50+0000\n"
+"PO-Revision-Date: 2018-01-03 03:50+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -20,24 +20,66 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:219
-#: code:addons/web_m2x_options/static/src/js/form.js:373
+#: code:addons/web_m2x_options/static/src/xml/base.xml:8
+#, python-format
+msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:47
+#, python-format
+msgid "Cancel"
+msgstr "Cancelar"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:33
+#, python-format
+msgid "Create"
+msgstr "Crear"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:232
+#: code:addons/web_m2x_options/static/src/js/form.js:382
#, python-format
msgid "Create \"%s\""
msgstr "Crear \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:237
-#: code:addons/web_m2x_options/static/src/js/form.js:392
+#: code:addons/web_m2x_options/static/src/js/form.js:30
+#, python-format
+msgid "Create a %s"
+msgstr "Crear un %s"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:250
+#: code:addons/web_m2x_options/static/src/js/form.js:401
#, python-format
msgid "Create and Edit..."
msgstr "Crear y editar..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:188
-#: code:addons/web_m2x_options/static/src/js/form.js:349
+#: code:addons/web_m2x_options/static/src/js/form.js:43
+#, python-format
+msgid "Create and edit"
+msgstr "Crear y editar"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:201
+#: code:addons/web_m2x_options/static/src/js/form.js:358
#, python-format
msgid "Search More..."
msgstr "Buscar más..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:52
+#, python-format
+msgid "You are creating a new %s, are you sure it does not exist yet?"
+msgstr "Está creando un nuevo %s, ¿está seguro de no existe ya?"
diff --git a/web_m2x_options/i18n/fi.po b/web_m2x_options/i18n/fi.po
index b374d7eb9458..0d5a5c6cc520 100644
--- a/web_m2x_options/i18n/fi.po
+++ b/web_m2x_options/i18n/fi.po
@@ -3,15 +3,15 @@
# * web_m2x_options
#
# Translators:
-# Jarmo Kortetjärvi , 2016
+# OCA Transbot , 2017
msgid ""
msgstr ""
-"Project-Id-Version: web (8.0)\n"
+"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-26 02:05+0000\n"
-"PO-Revision-Date: 2016-02-01 09:52+0000\n"
-"Last-Translator: Jarmo Kortetjärvi \n"
-"Language-Team: Finnish (http://www.transifex.com/oca/OCA-web-8-0/language/fi/)\n"
+"POT-Creation-Date: 2018-01-03 03:50+0000\n"
+"PO-Revision-Date: 2018-01-03 03:50+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -20,24 +20,66 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:219
-#: code:addons/web_m2x_options/static/src/js/form.js:373
+#: code:addons/web_m2x_options/static/src/xml/base.xml:8
+#, python-format
+msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:47
+#, python-format
+msgid "Cancel"
+msgstr "Peru"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:33
+#, python-format
+msgid "Create"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:232
+#: code:addons/web_m2x_options/static/src/js/form.js:382
#, python-format
msgid "Create \"%s\""
msgstr "Luo \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:237
-#: code:addons/web_m2x_options/static/src/js/form.js:392
+#: code:addons/web_m2x_options/static/src/js/form.js:30
+#, python-format
+msgid "Create a %s"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:250
+#: code:addons/web_m2x_options/static/src/js/form.js:401
#, python-format
msgid "Create and Edit..."
msgstr "Luo ja muokkaa..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:188
-#: code:addons/web_m2x_options/static/src/js/form.js:349
+#: code:addons/web_m2x_options/static/src/js/form.js:43
+#, python-format
+msgid "Create and edit"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:201
+#: code:addons/web_m2x_options/static/src/js/form.js:358
#, python-format
msgid "Search More..."
msgstr "Hae lisää..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:52
+#, python-format
+msgid "You are creating a new %s, are you sure it does not exist yet?"
+msgstr ""
diff --git a/web_m2x_options/i18n/fr.po b/web_m2x_options/i18n/fr.po
index 3be5ae233eab..31647daf9534 100644
--- a/web_m2x_options/i18n/fr.po
+++ b/web_m2x_options/i18n/fr.po
@@ -3,15 +3,15 @@
# * web_m2x_options
#
# Translators:
-# Christophe CHAUVET , 2016
+# OCA Transbot , 2017
msgid ""
msgstr ""
-"Project-Id-Version: web (8.0)\n"
+"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-05-06 15:50+0000\n"
-"PO-Revision-Date: 2016-05-06 08:27+0000\n"
-"Last-Translator: Christophe CHAUVET \n"
-"Language-Team: French (http://www.transifex.com/oca/OCA-web-8-0/language/fr/)\n"
+"POT-Creation-Date: 2018-01-03 03:50+0000\n"
+"PO-Revision-Date: 2018-01-03 03:50+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -20,24 +20,66 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:219
-#: code:addons/web_m2x_options/static/src/js/form.js:373
+#: code:addons/web_m2x_options/static/src/xml/base.xml:8
+#, python-format
+msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:47
+#, python-format
+msgid "Cancel"
+msgstr "Annuler"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:33
+#, python-format
+msgid "Create"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:232
+#: code:addons/web_m2x_options/static/src/js/form.js:382
#, python-format
msgid "Create \"%s\""
msgstr "Creer \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:237
-#: code:addons/web_m2x_options/static/src/js/form.js:392
+#: code:addons/web_m2x_options/static/src/js/form.js:30
+#, python-format
+msgid "Create a %s"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:250
+#: code:addons/web_m2x_options/static/src/js/form.js:401
#, python-format
msgid "Create and Edit..."
msgstr "Créer et modifier..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:188
-#: code:addons/web_m2x_options/static/src/js/form.js:349
+#: code:addons/web_m2x_options/static/src/js/form.js:43
+#, python-format
+msgid "Create and edit"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:201
+#: code:addons/web_m2x_options/static/src/js/form.js:358
#, python-format
msgid "Search More..."
msgstr "Rechercher plus..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:52
+#, python-format
+msgid "You are creating a new %s, are you sure it does not exist yet?"
+msgstr ""
diff --git a/web_m2x_options/i18n/hr.po b/web_m2x_options/i18n/hr.po
new file mode 100644
index 000000000000..644c0b4ba912
--- /dev/null
+++ b/web_m2x_options/i18n/hr.po
@@ -0,0 +1,86 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_m2x_options
+#
+# Translators:
+# Bole , 2017
+# OCA Transbot , 2017
+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: OCA Transbot , 2017\n"
+"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: hr\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/xml/base.xml:8
+#, python-format
+msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgstr "!(opcije isključuju otvaranje ili uređivanje)"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:47
+#, python-format
+msgid "Cancel"
+msgstr "Otkaži"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:33
+#, python-format
+msgid "Create"
+msgstr "Kreiraj"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:232
+#: code:addons/web_m2x_options/static/src/js/form.js:382
+#, python-format
+msgid "Create \"%s\""
+msgstr "Kreiraj \" %s\""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:30
+#, python-format
+msgid "Create a %s"
+msgstr "Kreiraj %s"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:250
+#: code:addons/web_m2x_options/static/src/js/form.js:401
+#, python-format
+msgid "Create and Edit..."
+msgstr "Kreiraj i uredi..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:43
+#, python-format
+msgid "Create and edit"
+msgstr "Kreiraj i uredi"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:201
+#: code:addons/web_m2x_options/static/src/js/form.js:358
+#, python-format
+msgid "Search More..."
+msgstr "Traži dalje..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:52
+#, python-format
+msgid "You are creating a new %s, are you sure it does not exist yet?"
+msgstr "Želite kreirati novi %s, jeste li sigurni da već ne postoji?"
diff --git a/web_m2x_options/i18n/it.po b/web_m2x_options/i18n/it.po
index c8db1568fdf7..47e767833181 100644
--- a/web_m2x_options/i18n/it.po
+++ b/web_m2x_options/i18n/it.po
@@ -3,27 +3,15 @@
# * web_m2x_options
#
# Translators:
-# Ahmet Altınışık , 2015
-# Antonio Trueba, 2016
-# Armando Vulcano Junior , 2015
-# Carles Antoli , 2015
-# Bole , 2015
-# FIRST AUTHOR , 2012,2014
-# Giacomo , 2015
-# Hotellook, 2014
-# Jarmo Kortetjärvi , 2016
-# Paolo Valier, 2016
-# Paolo Valier, 2016
-# Rudolf Schnapka , 2016
-# Thomas A. Jaeger, 2015
+# OCA Transbot , 2017
msgid ""
msgstr ""
-"Project-Id-Version: web (8.0)\n"
+"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-04-28 07:09+0000\n"
-"PO-Revision-Date: 2016-04-28 06:46+0000\n"
-"Last-Translator: Paolo Valier\n"
-"Language-Team: Italian (http://www.transifex.com/oca/OCA-web-8-0/language/it/)\n"
+"POT-Creation-Date: 2018-01-03 03:50+0000\n"
+"PO-Revision-Date: 2018-01-03 03:50+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -32,24 +20,66 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:219
-#: code:addons/web_m2x_options/static/src/js/form.js:373
+#: code:addons/web_m2x_options/static/src/xml/base.xml:8
+#, python-format
+msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:47
+#, python-format
+msgid "Cancel"
+msgstr "Annulla"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:33
+#, python-format
+msgid "Create"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:232
+#: code:addons/web_m2x_options/static/src/js/form.js:382
#, python-format
msgid "Create \"%s\""
msgstr "Crea \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:237
-#: code:addons/web_m2x_options/static/src/js/form.js:392
+#: code:addons/web_m2x_options/static/src/js/form.js:30
+#, python-format
+msgid "Create a %s"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:250
+#: code:addons/web_m2x_options/static/src/js/form.js:401
#, python-format
msgid "Create and Edit..."
msgstr "Crea e Modifica..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:188
-#: code:addons/web_m2x_options/static/src/js/form.js:349
+#: code:addons/web_m2x_options/static/src/js/form.js:43
+#, python-format
+msgid "Create and edit"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:201
+#: code:addons/web_m2x_options/static/src/js/form.js:358
#, python-format
msgid "Search More..."
msgstr "Cerca altro..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:52
+#, python-format
+msgid "You are creating a new %s, are you sure it does not exist yet?"
+msgstr ""
diff --git a/web_m2x_options/i18n/nl_NL.po b/web_m2x_options/i18n/nl_NL.po
new file mode 100644
index 000000000000..1f7da2402d17
--- /dev/null
+++ b/web_m2x_options/i18n/nl_NL.po
@@ -0,0 +1,85 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_m2x_options
+#
+# Translators:
+# Peter Hageman , 2017
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 10.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-07-01 03:35+0000\n"
+"PO-Revision-Date: 2017-07-01 03:35+0000\n"
+"Last-Translator: Peter Hageman , 2017\n"
+"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/23907/nl_NL/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: nl_NL\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/xml/base.xml:8
+#, python-format
+msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:47
+#, python-format
+msgid "Cancel"
+msgstr "Annuleer"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:33
+#, python-format
+msgid "Create"
+msgstr "Aanmaken"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:224
+#: code:addons/web_m2x_options/static/src/js/form.js:374
+#, python-format
+msgid "Create \"%s\""
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:30
+#, python-format
+msgid "Create a %s"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:242
+#: code:addons/web_m2x_options/static/src/js/form.js:393
+#, python-format
+msgid "Create and Edit..."
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:43
+#, python-format
+msgid "Create and edit"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:193
+#: code:addons/web_m2x_options/static/src/js/form.js:350
+#, python-format
+msgid "Search More..."
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:52
+#, python-format
+msgid "You are creating a new %s, are you sure it does not exist yet?"
+msgstr ""
diff --git a/web_m2x_options/i18n/pt_BR.po b/web_m2x_options/i18n/pt_BR.po
index cf28995e3eed..538bfc7e7930 100644
--- a/web_m2x_options/i18n/pt_BR.po
+++ b/web_m2x_options/i18n/pt_BR.po
@@ -3,15 +3,16 @@
# * web_m2x_options
#
# Translators:
-# danimaribeiro , 2016
+# OCA Transbot , 2017
+# Rodrigo de Almeida Sottomaior Macedo , 2017
msgid ""
msgstr ""
-"Project-Id-Version: web (8.0)\n"
+"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-11 02:17+0000\n"
-"PO-Revision-Date: 2016-03-05 16:20+0000\n"
-"Last-Translator: danimaribeiro \n"
-"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-web-8-0/language/pt_BR/)\n"
+"POT-Creation-Date: 2018-01-03 03:50+0000\n"
+"PO-Revision-Date: 2018-01-03 03:50+0000\n"
+"Last-Translator: Rodrigo de Almeida Sottomaior Macedo , 2017\n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -20,24 +21,67 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:219
-#: code:addons/web_m2x_options/static/src/js/form.js:373
+#: code:addons/web_m2x_options/static/src/xml/base.xml:8
+#, python-format
+msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgstr "!(widget.options.no_open || widget.options.no_open_edit)"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:47
+#, python-format
+msgid "Cancel"
+msgstr "Cancelar"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:33
+#, python-format
+msgid "Create"
+msgstr "Criar"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:232
+#: code:addons/web_m2x_options/static/src/js/form.js:382
#, python-format
msgid "Create \"%s\""
msgstr "Criar \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:237
-#: code:addons/web_m2x_options/static/src/js/form.js:392
+#: code:addons/web_m2x_options/static/src/js/form.js:30
+#, python-format
+msgid "Create a %s"
+msgstr "Criar um %s"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:250
+#: code:addons/web_m2x_options/static/src/js/form.js:401
#, python-format
msgid "Create and Edit..."
msgstr "Criar e editar.."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:188
-#: code:addons/web_m2x_options/static/src/js/form.js:349
+#: code:addons/web_m2x_options/static/src/js/form.js:43
+#, python-format
+msgid "Create and edit"
+msgstr "Criar e editar"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:201
+#: code:addons/web_m2x_options/static/src/js/form.js:358
#, python-format
msgid "Search More..."
msgstr "Buscar mais..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:52
+#, python-format
+msgid "You are creating a new %s, are you sure it does not exist yet?"
+msgstr ""
+"Você está criando um novo %s, você tem certeza de que ainda não existe?"
diff --git a/web_m2x_options/i18n/sl.po b/web_m2x_options/i18n/sl.po
index 7192762e128e..a4e3ae1f3184 100644
--- a/web_m2x_options/i18n/sl.po
+++ b/web_m2x_options/i18n/sl.po
@@ -3,15 +3,15 @@
# * web_m2x_options
#
# Translators:
-# Matjaž Mozetič , 2015
+# OCA Transbot , 2017
msgid ""
msgstr ""
-"Project-Id-Version: web (8.0)\n"
+"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-26 02:05+0000\n"
-"PO-Revision-Date: 2015-11-08 05:46+0000\n"
-"Last-Translator: Matjaž Mozetič \n"
-"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-web-8-0/language/sl/)\n"
+"POT-Creation-Date: 2018-01-03 03:50+0000\n"
+"PO-Revision-Date: 2018-01-03 03:50+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -20,24 +20,66 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:219
-#: code:addons/web_m2x_options/static/src/js/form.js:373
+#: code:addons/web_m2x_options/static/src/xml/base.xml:8
+#, python-format
+msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:47
+#, python-format
+msgid "Cancel"
+msgstr "Preklic"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:33
+#, python-format
+msgid "Create"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:232
+#: code:addons/web_m2x_options/static/src/js/form.js:382
#, python-format
msgid "Create \"%s\""
msgstr "Ustvari \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:237
-#: code:addons/web_m2x_options/static/src/js/form.js:392
+#: code:addons/web_m2x_options/static/src/js/form.js:30
+#, python-format
+msgid "Create a %s"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:250
+#: code:addons/web_m2x_options/static/src/js/form.js:401
#, python-format
msgid "Create and Edit..."
msgstr "Ustvari in urejaj..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:188
-#: code:addons/web_m2x_options/static/src/js/form.js:349
+#: code:addons/web_m2x_options/static/src/js/form.js:43
+#, python-format
+msgid "Create and edit"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:201
+#: code:addons/web_m2x_options/static/src/js/form.js:358
#, python-format
msgid "Search More..."
msgstr "Poišči več..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:52
+#, python-format
+msgid "You are creating a new %s, are you sure it does not exist yet?"
+msgstr ""
diff --git a/web_m2x_options/i18n/tr.po b/web_m2x_options/i18n/tr.po
index 2b9f46fdd2ee..584219f2c764 100644
--- a/web_m2x_options/i18n/tr.po
+++ b/web_m2x_options/i18n/tr.po
@@ -3,16 +3,15 @@
# * web_m2x_options
#
# Translators:
-# Ahmet Altınışık , 2015
-# Ahmet Altınışık , 2015
+# OCA Transbot , 2017
msgid ""
msgstr ""
-"Project-Id-Version: web (8.0)\n"
+"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-26 02:05+0000\n"
-"PO-Revision-Date: 2015-12-30 21:53+0000\n"
-"Last-Translator: Ahmet Altınışık \n"
-"Language-Team: Turkish (http://www.transifex.com/oca/OCA-web-8-0/language/tr/)\n"
+"POT-Creation-Date: 2018-01-03 03:50+0000\n"
+"PO-Revision-Date: 2018-01-03 03:50+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -21,24 +20,66 @@ msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:219
-#: code:addons/web_m2x_options/static/src/js/form.js:373
+#: code:addons/web_m2x_options/static/src/xml/base.xml:8
+#, python-format
+msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:47
+#, python-format
+msgid "Cancel"
+msgstr "İptal"
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:33
+#, python-format
+msgid "Create"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:232
+#: code:addons/web_m2x_options/static/src/js/form.js:382
#, python-format
msgid "Create \"%s\""
msgstr "Oluştur \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:237
-#: code:addons/web_m2x_options/static/src/js/form.js:392
+#: code:addons/web_m2x_options/static/src/js/form.js:30
+#, python-format
+msgid "Create a %s"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:250
+#: code:addons/web_m2x_options/static/src/js/form.js:401
#, python-format
msgid "Create and Edit..."
msgstr "Oluştur ve düzenle..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:188
-#: code:addons/web_m2x_options/static/src/js/form.js:349
+#: code:addons/web_m2x_options/static/src/js/form.js:43
+#, python-format
+msgid "Create and edit"
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:201
+#: code:addons/web_m2x_options/static/src/js/form.js:358
#, python-format
msgid "Search More..."
msgstr "Daha Fazla..."
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:52
+#, python-format
+msgid "You are creating a new %s, are you sure it does not exist yet?"
+msgstr ""
diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js
index 4b8d0ad13eea..4fb83da338e9 100644
--- a/web_m2x_options/static/src/js/form.js
+++ b/web_m2x_options/static/src/js/form.js
@@ -260,13 +260,9 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
});
form_relational.FieldMany2ManyTags.include({
- events: {
- 'click .o_delete': function(e) {
- this.remove_id($(e.target).parent().data('id'));
- },
- 'click .badge': 'open_badge',
- 'mousedown .o_colorpicker span': 'update_color',
- 'focusout .o_colorpicker': 'close_color_picker',
+ init: function () {
+ this.events["click .badge"] = "open_badge";
+ return this._super.apply(this, arguments);
},
show_error_displayer: function () {
if ((typeof this.options.m2o_dialog === 'undefined' && this.can_create) ||
diff --git a/web_m2x_options/static/src/xml/base.xml b/web_m2x_options/static/src/xml/base.xml
index 8b9421d190ac..094e942eada0 100644
--- a/web_m2x_options/static/src/xml/base.xml
+++ b/web_m2x_options/static/src/xml/base.xml
@@ -1,13 +1,11 @@
+
+
-
-
- jQuery(this).attr('t-if', '!(widget.options.no_open || widget.options.no_open_edit)');
+
+
+ !(widget.options.no_open || widget.options.no_open_edit)
+
-
-
-
- jQuery(this).attr('t-att-data-id', 'el[0]');
-
-
From 5e9f1f731b27ef529d1d53e2cd6193b35619a64c Mon Sep 17 00:00:00 2001
From: David Vidal
Date: Tue, 16 May 2017 12:55:02 +0200
Subject: [PATCH 124/454] [MIG] web_m2x_options: migrated to 10.0
---
web_m2x_options/README.rst | 4 ++++
.../{__openerp__.py => __manifest__.py} | 2 +-
web_m2x_options/static/src/js/form.js | 2 --
web_m2x_options/static/src/xml/base.xml | 6 ++++--
web_m2x_options/views/view.xml | 17 +++++++++--------
5 files changed, 18 insertions(+), 13 deletions(-)
rename web_m2x_options/{__openerp__.py => __manifest__.py} (92%)
diff --git a/web_m2x_options/README.rst b/web_m2x_options/README.rst
index 98cefc3c2dc6..f0e78aa44650 100644
--- a/web_m2x_options/README.rst
+++ b/web_m2x_options/README.rst
@@ -6,6 +6,9 @@
Add new options for many2one field
==================================
+Description
+-----------
+
This modules modifies "many2one" and "many2manytags" form widgets so as to add some new display
control options.
@@ -147,6 +150,7 @@ Contributors
* Yannick Vaucher
* Zakaria Makrelouf
* Jairo Llopis
+* David Vidal
Maintainer
----------
diff --git a/web_m2x_options/__openerp__.py b/web_m2x_options/__manifest__.py
similarity index 92%
rename from web_m2x_options/__openerp__.py
rename to web_m2x_options/__manifest__.py
index 7206c3ca0331..ac436e6a6911 100644
--- a/web_m2x_options/__openerp__.py
+++ b/web_m2x_options/__manifest__.py
@@ -2,7 +2,7 @@
{
"name": 'web_m2x_options',
- "version": "9.0.1.1.0",
+ "version": "10.0.1.0.0",
"depends": [
'base',
'web',
diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js
index 4fb83da338e9..13ec3a6e5d43 100644
--- a/web_m2x_options/static/src/js/form.js
+++ b/web_m2x_options/static/src/js/form.js
@@ -4,13 +4,11 @@
odoo.define('web_m2x_options.web_m2x_options', function (require) {
"use strict";
- var $ = require("$");
var core = require('web.core'),
data = require('web.data'),
Dialog = require('web.Dialog'),
Model = require('web.Model'),
form_relational = require('web.form_relational'),
- _ = require('_'),
_t = core._t;
var OPTIONS = ['web_m2x_options.create',
diff --git a/web_m2x_options/static/src/xml/base.xml b/web_m2x_options/static/src/xml/base.xml
index 094e942eada0..c095218bfe29 100644
--- a/web_m2x_options/static/src/xml/base.xml
+++ b/web_m2x_options/static/src/xml/base.xml
@@ -4,8 +4,10 @@
-
- !(widget.options.no_open || widget.options.no_open_edit)
+
+
+ !(widget.options.no_open || widget.options.no_open_edit)
+
diff --git a/web_m2x_options/views/view.xml b/web_m2x_options/views/view.xml
index 9628625b5103..85d435c1e140 100644
--- a/web_m2x_options/views/view.xml
+++ b/web_m2x_options/views/view.xml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
+
+
-
+
-
-
+
+
From a336e8af0cafc0f5ccb32d8b5ef05eb3e212fe74 Mon Sep 17 00:00:00 2001
From: jesusVMayor
Date: Tue, 30 May 2017 13:27:24 +0200
Subject: [PATCH 125/454] [IMP] web_m2x_options: Perf issue
https://github.com/OCA/web/issues/615 * fix unecessary calls
Do check_access_rights and disable_quick_create calls only once per field.
---
web_m2x_options/static/src/js/form.js | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js
index 13ec3a6e5d43..fb46f274c7a2 100644
--- a/web_m2x_options/static/src/js/form.js
+++ b/web_m2x_options/static/src/js/form.js
@@ -111,7 +111,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
if (_.isUndefined(this.view))
return this._super.apply(this, arguments);
if (!_.isUndefined(this.view.ir_options['web_m2x_options.limit'])) {
- this.limit = parseInt(this.view.ir_options['web_m2x_options.limit']);
+ this.limit = parseInt(this.view.ir_options['web_m2x_options.limit'], 10);
}
if (typeof this.options.limit === 'number') {
@@ -134,13 +134,14 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
'ilike', this.limit + 1,
self.build_context()));
- var create_rights;
if (!(self.options && (self.is_option_set(self.options.create) || self.is_option_set(self.options.create_edit)))) {
- create_rights = new Model(this.field.relation).call(
+ this.create_rights = this.create_rights || (function(){
+ return new Model(self.field.relation).call(
"check_access_rights", ["create", false]);
+ })();
}
- $.when(search_result, create_rights).then(function (data, can_create) {
+ $.when(search_result, this.create_rights).then(function (data, can_create) {
self.can_create = can_create; // for ``.show_error_displayer()``
self.last_search = data;
@@ -200,7 +201,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
self._search_create_popup("search", data);
});
},
- classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
+ classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
});
}
@@ -225,7 +226,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
action: function () {
self._quick_create(search_val);
},
- classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
+ classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
});
}
}
@@ -244,7 +245,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
"form", undefined,
self._create_context(search_val));
},
- classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
+ classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
});
}
// Check if colors specified to wait for RPC
@@ -316,7 +317,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
// returned.
if (!_.isUndefined(this.view.ir_options['web_m2x_options.limit'])) {
- this.limit = parseInt(this.view.ir_options['web_m2x_options.limit']);
+ this.limit = parseInt(this.view.ir_options['web_m2x_options.limit'], 10);
}
if (typeof this.options.limit === 'number') {
@@ -356,7 +357,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
self._search_create_popup("search", data);
});
},
- classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
+ classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
});
}
// quick create
@@ -375,7 +376,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
action: function() {
self._quick_create(search_val);
},
- classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
+ classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
});
}
}
@@ -393,7 +394,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
action: function() {
self._search_create_popup("form", undefined, self._create_context(search_val));
},
- classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
+ classname: 'oe_m2o_dropdown_option o_m2o_dropdown_option'
});
}
@@ -406,7 +407,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
var open = (self.options && self.is_option_set(self.options.open));
if(open){
self.mutex.exec(function(){
- var id = parseInt($(ev.currentTarget).data('id'));
+ var id = parseInt($(ev.currentTarget).data('id'), 10);
self.do_action({
type: 'ir.actions.act_window',
res_model: self.field.relation,
From 8b56b1e8456235d12bce7e3e881b5faadda765c3 Mon Sep 17 00:00:00 2001
From: jesusVMayor
Date: Tue, 30 May 2017 16:18:24 +0200
Subject: [PATCH 126/454] web_m2x_options: Hide the create/create and edit...
button when the user does not have creation permission.
---
web_m2x_options/static/src/js/form.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js
index fb46f274c7a2..e3cc0b5e54df 100644
--- a/web_m2x_options/static/src/js/form.js
+++ b/web_m2x_options/static/src/js/form.js
@@ -215,7 +215,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
m2x_create_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create']),
m2x_create = self.is_option_set(self.view.ir_options['web_m2x_options.create']);
var show_create = (!self.options && (m2x_create_undef || m2x_create)) || (self.options && (quick_create || (quick_create_undef && (m2x_create_undef || m2x_create))));
- if (show_create){
+ if (self.can_create && show_create){
if (search_val.length > 0 &&
!_.include(raw_result, search_val)) {
@@ -237,7 +237,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
m2x_create_edit_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create_edit']),
m2x_create_edit = self.is_option_set(self.view.ir_options['web_m2x_options.create_edit']);
var show_create_edit = (!self.options && (m2x_create_edit_undef || m2x_create_edit)) || (self.options && (create_edit || (create_edit_undef && (m2x_create_edit_undef || m2x_create_edit))));
- if (show_create_edit){
+ if (self.can_create && show_create_edit){
values.push({
label: _t("Create and Edit..."),
action: function () {
From 834bbf275cb05998f4f6ca339ddca0c7e49846c4 Mon Sep 17 00:00:00 2001
From: Akim Juillerat
Date: Tue, 5 Sep 2017 09:47:23 +0200
Subject: [PATCH 127/454] [10.0][ADD] option to deactivate color picker on
many2many_tags (#713)
---
web_m2x_options/README.rst | 4 ++++
web_m2x_options/__manifest__.py | 2 +-
web_m2x_options/static/src/js/form.js | 5 +++++
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/web_m2x_options/README.rst b/web_m2x_options/README.rst
index f0e78aa44650..0013a2baa4db 100644
--- a/web_m2x_options/README.rst
+++ b/web_m2x_options/README.rst
@@ -72,6 +72,10 @@ in the field's options dict
Makes many2many_tags buttons that open the linked resource
+``no_color_picker`` *boolean* (Default: ``False``)
+
+ Deactivates the color picker on many2many_tags buttons to do nothing (ignored if open is set)
+
ir.config_parameter options
---------------------------
diff --git a/web_m2x_options/__manifest__.py b/web_m2x_options/__manifest__.py
index ac436e6a6911..fd51b4162d23 100644
--- a/web_m2x_options/__manifest__.py
+++ b/web_m2x_options/__manifest__.py
@@ -2,7 +2,7 @@
{
"name": 'web_m2x_options',
- "version": "10.0.1.0.0",
+ "version": "10.0.1.1.0",
"depends": [
'base',
'web',
diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js
index e3cc0b5e54df..fb8ce8d0f39e 100644
--- a/web_m2x_options/static/src/js/form.js
+++ b/web_m2x_options/static/src/js/form.js
@@ -405,6 +405,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
open_badge: function(ev){
var self = this;
var open = (self.options && self.is_option_set(self.options.open));
+ var no_color_picker = (self.options && self.is_option_set(self.options.no_color_picker));
if(open){
self.mutex.exec(function(){
var id = parseInt($(ev.currentTarget).data('id'), 10);
@@ -416,6 +417,10 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
target: "new"
});
}.bind(this));
+ }else if(no_color_picker){
+ self.mutex.exec(function(){
+ return
+ }.bind(this));
}else{
self.open_color_picker(ev);
}
From 095bb99e451ff13d42a1dd9e64e31857f395291b Mon Sep 17 00:00:00 2001
From: Jairo Llopis
Date: Fri, 20 Oct 2017 13:31:52 +0200
Subject: [PATCH 128/454] [FIX] web_m2x_options: Compatibilize with
web_advanced_search_x2x
`web_m2x_options` is supposed to render fields in the context of a form or tree view, where domains can safely be applied because there's a main record that includes a context.
However, when installing along with `web_advanced_search_x2x`, they produce an incompatibility when a x2x field's domain is defined and depends on the current record's context, because a search view has no notion of a *current record*.
The fix is simple: try to do as usual, and if it fails, try without the field's domain.
Without this patch, an exception like this would be raised, i.e. when both addons are installed and you are trying to search project tasks by stage:
``` Error: NameError: name 'project_id' is not defined
http://localhost/web/static/lib/py.js/lib/py.js:370# Traceback:# Changes to be committed:
PY_ensurepy@http://localhost/web/static/lib/py.js/lib/py.js:370:19# modified: static/src/js/form.js
py.evaluate@http://localhost/web/static/lib/py.js/lib/py.js:1340:20#
py.evaluate@http://localhost/web/static/lib/py.js/lib/py.js:1397:35
py.evaluate@http://localhost/web/static/lib/py.js/lib/py.js:1409:34
py.eval@http://localhost/web/static/lib/py.js/lib/py.js:1453:16
eval_domains/<@http://localhost/web/static/src/js/framework/pyeval.js:869:39
_.forEach@http://localhost/web/static/lib/underscore/underscore.js:145:9
_.mixin/
Date: Mon, 28 May 2018 00:19:27 -0400
Subject: [PATCH 129/454] [MIG] web_m2x_options: Migration to 11.0
web_m2x_options: Fix usage for non-admins
web_m2x_options: Reduce rpc calls
web_m2x_options: Update manifest and readme
---
web_m2x_options/README.rst | 98 +--
web_m2x_options/__init__.py | 2 +-
web_m2x_options/__manifest__.py | 17 +-
web_m2x_options/i18n/ar.po | 47 +-
web_m2x_options/i18n/de.po | 46 +-
web_m2x_options/i18n/es.po | 44 +-
web_m2x_options/i18n/fi.po | 44 +-
web_m2x_options/i18n/fr.po | 44 +-
web_m2x_options/i18n/hr.po | 49 +-
web_m2x_options/i18n/it.po | 44 +-
web_m2x_options/i18n/nl_NL.po | 47 +-
web_m2x_options/i18n/pt_BR.po | 52 +-
web_m2x_options/i18n/sl.po | 47 +-
web_m2x_options/i18n/tr.po | 44 +-
web_m2x_options/i18n/web_m2x_options.pot | 97 +++
web_m2x_options/models/__init__.py | 1 +
web_m2x_options/models/ir_config_parameter.py | 12 +
web_m2x_options/readme/CONTRIBUTORS.rst | 11 +
web_m2x_options/readme/DESCRIPTION.rst | 10 +
web_m2x_options/readme/ROADMAP.rst | 6 +
web_m2x_options/readme/USAGE.rst | 88 +++
web_m2x_options/static/src/js/form.js | 588 ++++++++----------
web_m2x_options/static/src/xml/base.xml | 2 +-
web_m2x_options/views/view.xml | 15 +-
24 files changed, 905 insertions(+), 550 deletions(-)
create mode 100644 web_m2x_options/i18n/web_m2x_options.pot
create mode 100644 web_m2x_options/models/__init__.py
create mode 100644 web_m2x_options/models/ir_config_parameter.py
create mode 100644 web_m2x_options/readme/CONTRIBUTORS.rst
create mode 100644 web_m2x_options/readme/DESCRIPTION.rst
create mode 100644 web_m2x_options/readme/ROADMAP.rst
create mode 100644 web_m2x_options/readme/USAGE.rst
diff --git a/web_m2x_options/README.rst b/web_m2x_options/README.rst
index 0013a2baa4db..a0e129d4188e 100644
--- a/web_m2x_options/README.rst
+++ b/web_m2x_options/README.rst
@@ -1,13 +1,29 @@
-.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
- :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
- :alt: License: AGPL-3
-
-==================================
-Add new options for many2one field
-==================================
-
-Description
------------
+===============
+web_m2x_options
+===============
+
+.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! This file is generated by oca-gen-addon-readme !!
+ !! changes will be overwritten. !!
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+.. |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/11.0/web_m2x_options
+ :alt: OCA/web
+.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
+ :target: https://translation.odoo-community.org/projects/web-11-0/web-11-0-web_m2x_options
+ :alt: Translate me on Weblate
+.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
+ :target: https://runbot.odoo-community.org/runbot/162/11.0
+ :alt: Try me on Runbot
+
+|badge1| |badge2| |badge3| |badge4| |badge5|
This modules modifies "many2one" and "many2manytags" form widgets so as to add some new display
control options.
@@ -20,19 +36,16 @@ case of validation error.
If not specified, the module will avoid proposing any of the create options
if the current user has no permission rights to create the related object.
-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/8.0
+**Table of contents**
-For further information, please visit:
+.. contents::
+ :local:
-* https://www.odoo.com/forum/help-1
+Usage
+=====
in the field's options dict
----------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
``create`` *boolean* (Default: depends if user have create rights)
@@ -77,7 +90,7 @@ in the field's options dict
Deactivates the color picker on many2many_tags buttons to do nothing (ignored if open is set)
ir.config_parameter options
----------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now you can disable "Create..." and "Create and Edit..." entry for all widgets in the odoo instance.
If you disable one option, you can enable it for particular field by setting "create: True" option directly on the field definition.
@@ -112,7 +125,7 @@ To add these parameters go to Configuration -> Technical -> Parameters -> System
Example
--------
+~~~~~~~
Your XML form view definition could contain::
@@ -120,14 +133,11 @@ Your XML form view definition could contain::
...
-Known issues
-============
+Known issues / Roadmap
+======================
Double check that you have no inherited view that remove ``options`` you set on a field !
-If nothing works, add a debugger in the first line of ``get_search_result method`` and enable debug mode in Odoo. When you write something in a many2one field, javascript debugger should pause. If not verify your installation.
-
-Roadmap
-=======
+If nothing works, add a debugger in the first line of ``_search method`` and enable debug mode in Odoo. When you write something in a many2one field, javascript debugger should pause. If not verify your installation.
- Instead of making the tags rectangle clickable, I think it's better to put the text as a clickable link, so we will get a consistent behaviour/aspect with other clickable elements (many2one...).
- In edit mode, it would be great to add an icon like the one on many2one fields to allow to open the many2many in a popup window.
@@ -138,14 +148,23 @@ 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 `_.
+If you spotted it first, help us smashing it by providing a detailed and welcomed
+`feedback `_.
+
+Do not contact contributors directly about support or help with technical issues.
Credits
=======
+Authors
+~~~~~~~
+
+* ACSONE SA/NV
+* 0k.io
+* Tecnativa
+
Contributors
-------------
+~~~~~~~~~~~~
* David Coninckx
* Emanuel Cino
@@ -153,20 +172,25 @@ Contributors
* Nicolas JEUDY
* Yannick Vaucher
* Zakaria Makrelouf
-* Jairo Llopis
-* David Vidal
+* `Tecnativa `_:
-Maintainer
-----------
+ * Jairo Llopis
+ * David Vidal
+ * Ernesto Tejeda
+
+Maintainers
+~~~~~~~~~~~
+
+This module is maintained by the OCA.
.. 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.
+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_m2x_options/__init__.py b/web_m2x_options/__init__.py
index 57d631c3f004..0650744f6bc6 100644
--- a/web_m2x_options/__init__.py
+++ b/web_m2x_options/__init__.py
@@ -1 +1 @@
-# coding: utf-8
+from . import models
diff --git a/web_m2x_options/__manifest__.py b/web_m2x_options/__manifest__.py
index fd51b4162d23..04b0986ef82d 100644
--- a/web_m2x_options/__manifest__.py
+++ b/web_m2x_options/__manifest__.py
@@ -1,18 +1,23 @@
-# -*- coding: utf-8 -*-
{
"name": 'web_m2x_options',
- "version": "10.0.1.1.0",
+ "version": "11.0.1.0.0",
+ 'category': 'Web',
+ "author": "ACSONE SA/NV, "
+ "0k.io, "
+ "Tecnativa, "
+ "Odoo Community Association (OCA)",
+ 'website': 'https://github.com/OCA/web',
+ 'license': 'AGPL-3',
"depends": [
'base',
'web',
],
+ 'data': [
+ 'views/view.xml'
+ ],
'qweb': [
'static/src/xml/base.xml',
],
- 'license': 'AGPL-3',
- 'data': ['views/view.xml'],
- "author": "ACSONE SA/NV, 0k.io, Tecnativa, "
- "Odoo Community Association (OCA)",
'installable': True,
}
diff --git a/web_m2x_options/i18n/ar.po b/web_m2x_options/i18n/ar.po
index 6253ba90233d..af11fdcf2259 100644
--- a/web_m2x_options/i18n/ar.po
+++ b/web_m2x_options/i18n/ar.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -12,74 +12,91 @@ msgstr ""
"PO-Revision-Date: 2018-01-03 03:50+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
"Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n"
+"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: ar\n"
-"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
+"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
+"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
#. module: web_m2x_options
#. openerp-web
#: code:addons/web_m2x_options/static/src/xml/base.xml:8
#, python-format
-msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:47
+#: code:addons/web_m2x_options/static/src/js/form.js:52
#, python-format
msgid "Cancel"
msgstr "إلغاء"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:33
+#: code:addons/web_m2x_options/static/src/js/form.js:31
#, python-format
msgid "Create"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:232
-#: code:addons/web_m2x_options/static/src/js/form.js:382
+#: code:addons/web_m2x_options/static/src/js/form.js:241
#, python-format
msgid "Create \"%s\""
msgstr "إنشاء \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:30
+#: code:addons/web_m2x_options/static/src/js/form.js:28
#, python-format
msgid "Create a %s"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:250
-#: code:addons/web_m2x_options/static/src/js/form.js:401
+#: code:addons/web_m2x_options/static/src/js/form.js:261
#, python-format
msgid "Create and Edit..."
msgstr "إنشاء وتحرير ..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:43
+#: code:addons/web_m2x_options/static/src/js/form.js:42
#, python-format
msgid "Create and edit"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:201
-#: code:addons/web_m2x_options/static/src/js/form.js:358
+#: code:addons/web_m2x_options/static/src/js/form.js:267
+#, python-format
+msgid "No results to show..."
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:341
+#, python-format
+msgid "Open: "
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:206
#, python-format
msgid "Search More..."
msgstr "البحث عن المزيد ..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:52
+#: code:addons/web_m2x_options/static/src/js/form.js:58
#, python-format
msgid "You are creating a new %s, are you sure it does not exist yet?"
msgstr ""
+
+#. module: web_m2x_options
+#: model:ir.model,name:web_m2x_options.model_ir_config_parameter
+msgid "ir.config_parameter"
+msgstr ""
diff --git a/web_m2x_options/i18n/de.po b/web_m2x_options/i18n/de.po
index da119936d9a9..8205b855d23d 100644
--- a/web_m2x_options/i18n/de.po
+++ b/web_m2x_options/i18n/de.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options
-#
+#
# Translators:
# OCA Transbot , 2017
# Rudolf Schnapka , 2018
@@ -13,76 +13,92 @@ 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_m2x_options
#. openerp-web
#: code:addons/web_m2x_options/static/src/xml/base.xml:8
-#, python-format
-msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+#, fuzzy, python-format
+msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
msgstr "!(widget.options.no_open || widget.options.no_open_edit)"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:47
+#: code:addons/web_m2x_options/static/src/js/form.js:52
#, python-format
msgid "Cancel"
msgstr "Abbrechen"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:33
+#: code:addons/web_m2x_options/static/src/js/form.js:31
#, python-format
msgid "Create"
msgstr "Anlegen"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:232
-#: code:addons/web_m2x_options/static/src/js/form.js:382
+#: code:addons/web_m2x_options/static/src/js/form.js:241
#, python-format
msgid "Create \"%s\""
msgstr "Anlegen \"%s"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:30
+#: code:addons/web_m2x_options/static/src/js/form.js:28
#, python-format
msgid "Create a %s"
msgstr "Eine %s anlegen"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:250
-#: code:addons/web_m2x_options/static/src/js/form.js:401
+#: code:addons/web_m2x_options/static/src/js/form.js:261
#, python-format
msgid "Create and Edit..."
msgstr "Anlegen und Bearbeiten"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:43
+#: code:addons/web_m2x_options/static/src/js/form.js:42
#, python-format
msgid "Create and edit"
msgstr "Anlegen und bearbeiten"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:201
-#: code:addons/web_m2x_options/static/src/js/form.js:358
+#: code:addons/web_m2x_options/static/src/js/form.js:267
+#, python-format
+msgid "No results to show..."
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:341
+#, python-format
+msgid "Open: "
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:206
#, python-format
msgid "Search More..."
msgstr "Suche weitere..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:52
+#: code:addons/web_m2x_options/static/src/js/form.js:58
#, python-format
msgid "You are creating a new %s, are you sure it does not exist yet?"
msgstr ""
"Sie legen eine neue %s an, sind Sie sicher, dass diese nicht bereits "
"vorhanden ist?"
+
+#. module: web_m2x_options
+#: model:ir.model,name:web_m2x_options.model_ir_config_parameter
+msgid "ir.config_parameter"
+msgstr ""
diff --git a/web_m2x_options/i18n/es.po b/web_m2x_options/i18n/es.po
index 0c2c9feb215b..ed1e6da8f047 100644
--- a/web_m2x_options/i18n/es.po
+++ b/web_m2x_options/i18n/es.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -12,74 +12,90 @@ msgstr ""
"PO-Revision-Date: 2018-01-03 03:50+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
+"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: web_m2x_options
#. openerp-web
#: code:addons/web_m2x_options/static/src/xml/base.xml:8
#, python-format
-msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:47
+#: code:addons/web_m2x_options/static/src/js/form.js:52
#, python-format
msgid "Cancel"
msgstr "Cancelar"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:33
+#: code:addons/web_m2x_options/static/src/js/form.js:31
#, python-format
msgid "Create"
msgstr "Crear"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:232
-#: code:addons/web_m2x_options/static/src/js/form.js:382
+#: code:addons/web_m2x_options/static/src/js/form.js:241
#, python-format
msgid "Create \"%s\""
msgstr "Crear \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:30
+#: code:addons/web_m2x_options/static/src/js/form.js:28
#, python-format
msgid "Create a %s"
msgstr "Crear un %s"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:250
-#: code:addons/web_m2x_options/static/src/js/form.js:401
+#: code:addons/web_m2x_options/static/src/js/form.js:261
#, python-format
msgid "Create and Edit..."
msgstr "Crear y editar..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:43
+#: code:addons/web_m2x_options/static/src/js/form.js:42
#, python-format
msgid "Create and edit"
msgstr "Crear y editar"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:201
-#: code:addons/web_m2x_options/static/src/js/form.js:358
+#: code:addons/web_m2x_options/static/src/js/form.js:267
+#, python-format
+msgid "No results to show..."
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:341
+#, python-format
+msgid "Open: "
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:206
#, python-format
msgid "Search More..."
msgstr "Buscar más..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:52
+#: code:addons/web_m2x_options/static/src/js/form.js:58
#, python-format
msgid "You are creating a new %s, are you sure it does not exist yet?"
msgstr "Está creando un nuevo %s, ¿está seguro de no existe ya?"
+
+#. module: web_m2x_options
+#: model:ir.model,name:web_m2x_options.model_ir_config_parameter
+msgid "ir.config_parameter"
+msgstr ""
diff --git a/web_m2x_options/i18n/fi.po b/web_m2x_options/i18n/fi.po
index 0d5a5c6cc520..6dbcfd4ff364 100644
--- a/web_m2x_options/i18n/fi.po
+++ b/web_m2x_options/i18n/fi.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -12,74 +12,90 @@ msgstr ""
"PO-Revision-Date: 2018-01-03 03:50+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
"Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n"
+"Language: fi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: fi\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: web_m2x_options
#. openerp-web
#: code:addons/web_m2x_options/static/src/xml/base.xml:8
#, python-format
-msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:47
+#: code:addons/web_m2x_options/static/src/js/form.js:52
#, python-format
msgid "Cancel"
msgstr "Peru"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:33
+#: code:addons/web_m2x_options/static/src/js/form.js:31
#, python-format
msgid "Create"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:232
-#: code:addons/web_m2x_options/static/src/js/form.js:382
+#: code:addons/web_m2x_options/static/src/js/form.js:241
#, python-format
msgid "Create \"%s\""
msgstr "Luo \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:30
+#: code:addons/web_m2x_options/static/src/js/form.js:28
#, python-format
msgid "Create a %s"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:250
-#: code:addons/web_m2x_options/static/src/js/form.js:401
+#: code:addons/web_m2x_options/static/src/js/form.js:261
#, python-format
msgid "Create and Edit..."
msgstr "Luo ja muokkaa..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:43
+#: code:addons/web_m2x_options/static/src/js/form.js:42
#, python-format
msgid "Create and edit"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:201
-#: code:addons/web_m2x_options/static/src/js/form.js:358
+#: code:addons/web_m2x_options/static/src/js/form.js:267
+#, python-format
+msgid "No results to show..."
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:341
+#, python-format
+msgid "Open: "
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:206
#, python-format
msgid "Search More..."
msgstr "Hae lisää..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:52
+#: code:addons/web_m2x_options/static/src/js/form.js:58
#, python-format
msgid "You are creating a new %s, are you sure it does not exist yet?"
msgstr ""
+
+#. module: web_m2x_options
+#: model:ir.model,name:web_m2x_options.model_ir_config_parameter
+msgid "ir.config_parameter"
+msgstr ""
diff --git a/web_m2x_options/i18n/fr.po b/web_m2x_options/i18n/fr.po
index 31647daf9534..9e004322dfda 100644
--- a/web_m2x_options/i18n/fr.po
+++ b/web_m2x_options/i18n/fr.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -12,74 +12,90 @@ msgstr ""
"PO-Revision-Date: 2018-01-03 03:50+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
+"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: web_m2x_options
#. openerp-web
#: code:addons/web_m2x_options/static/src/xml/base.xml:8
#, python-format
-msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:47
+#: code:addons/web_m2x_options/static/src/js/form.js:52
#, python-format
msgid "Cancel"
msgstr "Annuler"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:33
+#: code:addons/web_m2x_options/static/src/js/form.js:31
#, python-format
msgid "Create"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:232
-#: code:addons/web_m2x_options/static/src/js/form.js:382
+#: code:addons/web_m2x_options/static/src/js/form.js:241
#, python-format
msgid "Create \"%s\""
msgstr "Creer \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:30
+#: code:addons/web_m2x_options/static/src/js/form.js:28
#, python-format
msgid "Create a %s"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:250
-#: code:addons/web_m2x_options/static/src/js/form.js:401
+#: code:addons/web_m2x_options/static/src/js/form.js:261
#, python-format
msgid "Create and Edit..."
msgstr "Créer et modifier..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:43
+#: code:addons/web_m2x_options/static/src/js/form.js:42
#, python-format
msgid "Create and edit"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:201
-#: code:addons/web_m2x_options/static/src/js/form.js:358
+#: code:addons/web_m2x_options/static/src/js/form.js:267
+#, python-format
+msgid "No results to show..."
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:341
+#, python-format
+msgid "Open: "
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:206
#, python-format
msgid "Search More..."
msgstr "Rechercher plus..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:52
+#: code:addons/web_m2x_options/static/src/js/form.js:58
#, python-format
msgid "You are creating a new %s, are you sure it does not exist yet?"
msgstr ""
+
+#. module: web_m2x_options
+#: model:ir.model,name:web_m2x_options.model_ir_config_parameter
+msgid "ir.config_parameter"
+msgstr ""
diff --git a/web_m2x_options/i18n/hr.po b/web_m2x_options/i18n/hr.po
index 644c0b4ba912..bbc49744a135 100644
--- a/web_m2x_options/i18n/hr.po
+++ b/web_m2x_options/i18n/hr.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options
-#
+#
# Translators:
# Bole , 2017
# OCA Transbot , 2017
@@ -13,74 +13,91 @@ msgstr ""
"PO-Revision-Date: 2018-01-03 03:50+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
+"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: hr\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: web_m2x_options
#. openerp-web
#: code:addons/web_m2x_options/static/src/xml/base.xml:8
-#, python-format
-msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+#, fuzzy, python-format
+msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
msgstr "!(opcije isključuju otvaranje ili uređivanje)"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:47
+#: code:addons/web_m2x_options/static/src/js/form.js:52
#, python-format
msgid "Cancel"
msgstr "Otkaži"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:33
+#: code:addons/web_m2x_options/static/src/js/form.js:31
#, python-format
msgid "Create"
msgstr "Kreiraj"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:232
-#: code:addons/web_m2x_options/static/src/js/form.js:382
+#: code:addons/web_m2x_options/static/src/js/form.js:241
#, python-format
msgid "Create \"%s\""
msgstr "Kreiraj \" %s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:30
+#: code:addons/web_m2x_options/static/src/js/form.js:28
#, python-format
msgid "Create a %s"
msgstr "Kreiraj %s"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:250
-#: code:addons/web_m2x_options/static/src/js/form.js:401
+#: code:addons/web_m2x_options/static/src/js/form.js:261
#, python-format
msgid "Create and Edit..."
msgstr "Kreiraj i uredi..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:43
+#: code:addons/web_m2x_options/static/src/js/form.js:42
#, python-format
msgid "Create and edit"
msgstr "Kreiraj i uredi"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:201
-#: code:addons/web_m2x_options/static/src/js/form.js:358
+#: code:addons/web_m2x_options/static/src/js/form.js:267
+#, python-format
+msgid "No results to show..."
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:341
+#, python-format
+msgid "Open: "
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:206
#, python-format
msgid "Search More..."
msgstr "Traži dalje..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:52
+#: code:addons/web_m2x_options/static/src/js/form.js:58
#, python-format
msgid "You are creating a new %s, are you sure it does not exist yet?"
msgstr "Želite kreirati novi %s, jeste li sigurni da već ne postoji?"
+
+#. module: web_m2x_options
+#: model:ir.model,name:web_m2x_options.model_ir_config_parameter
+msgid "ir.config_parameter"
+msgstr ""
diff --git a/web_m2x_options/i18n/it.po b/web_m2x_options/i18n/it.po
index 47e767833181..68f5c22c099d 100644
--- a/web_m2x_options/i18n/it.po
+++ b/web_m2x_options/i18n/it.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -12,74 +12,90 @@ msgstr ""
"PO-Revision-Date: 2018-01-03 03:50+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
+"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: web_m2x_options
#. openerp-web
#: code:addons/web_m2x_options/static/src/xml/base.xml:8
#, python-format
-msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:47
+#: code:addons/web_m2x_options/static/src/js/form.js:52
#, python-format
msgid "Cancel"
msgstr "Annulla"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:33
+#: code:addons/web_m2x_options/static/src/js/form.js:31
#, python-format
msgid "Create"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:232
-#: code:addons/web_m2x_options/static/src/js/form.js:382
+#: code:addons/web_m2x_options/static/src/js/form.js:241
#, python-format
msgid "Create \"%s\""
msgstr "Crea \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:30
+#: code:addons/web_m2x_options/static/src/js/form.js:28
#, python-format
msgid "Create a %s"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:250
-#: code:addons/web_m2x_options/static/src/js/form.js:401
+#: code:addons/web_m2x_options/static/src/js/form.js:261
#, python-format
msgid "Create and Edit..."
msgstr "Crea e Modifica..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:43
+#: code:addons/web_m2x_options/static/src/js/form.js:42
#, python-format
msgid "Create and edit"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:201
-#: code:addons/web_m2x_options/static/src/js/form.js:358
+#: code:addons/web_m2x_options/static/src/js/form.js:267
+#, python-format
+msgid "No results to show..."
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:341
+#, python-format
+msgid "Open: "
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:206
#, python-format
msgid "Search More..."
msgstr "Cerca altro..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:52
+#: code:addons/web_m2x_options/static/src/js/form.js:58
#, python-format
msgid "You are creating a new %s, are you sure it does not exist yet?"
msgstr ""
+
+#. module: web_m2x_options
+#: model:ir.model,name:web_m2x_options.model_ir_config_parameter
+msgid "ir.config_parameter"
+msgstr ""
diff --git a/web_m2x_options/i18n/nl_NL.po b/web_m2x_options/i18n/nl_NL.po
index 1f7da2402d17..112fcc408b04 100644
--- a/web_m2x_options/i18n/nl_NL.po
+++ b/web_m2x_options/i18n/nl_NL.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options
-#
+#
# Translators:
# Peter Hageman , 2017
msgid ""
@@ -11,75 +11,92 @@ msgstr ""
"POT-Creation-Date: 2017-07-01 03:35+0000\n"
"PO-Revision-Date: 2017-07-01 03:35+0000\n"
"Last-Translator: Peter Hageman , 2017\n"
-"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/23907/nl_NL/)\n"
+"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/"
+"teams/23907/nl_NL/)\n"
+"Language: nl_NL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: nl_NL\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: web_m2x_options
#. openerp-web
#: code:addons/web_m2x_options/static/src/xml/base.xml:8
#, python-format
-msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:47
+#: code:addons/web_m2x_options/static/src/js/form.js:52
#, python-format
msgid "Cancel"
msgstr "Annuleer"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:33
+#: code:addons/web_m2x_options/static/src/js/form.js:31
#, python-format
msgid "Create"
msgstr "Aanmaken"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:224
-#: code:addons/web_m2x_options/static/src/js/form.js:374
+#: code:addons/web_m2x_options/static/src/js/form.js:241
#, python-format
msgid "Create \"%s\""
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:30
+#: code:addons/web_m2x_options/static/src/js/form.js:28
#, python-format
msgid "Create a %s"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:242
-#: code:addons/web_m2x_options/static/src/js/form.js:393
+#: code:addons/web_m2x_options/static/src/js/form.js:261
#, python-format
msgid "Create and Edit..."
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:43
+#: code:addons/web_m2x_options/static/src/js/form.js:42
#, python-format
msgid "Create and edit"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:193
-#: code:addons/web_m2x_options/static/src/js/form.js:350
+#: code:addons/web_m2x_options/static/src/js/form.js:267
+#, python-format
+msgid "No results to show..."
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:341
+#, python-format
+msgid "Open: "
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:206
#, python-format
msgid "Search More..."
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:52
+#: code:addons/web_m2x_options/static/src/js/form.js:58
#, python-format
msgid "You are creating a new %s, are you sure it does not exist yet?"
msgstr ""
+
+#. module: web_m2x_options
+#: model:ir.model,name:web_m2x_options.model_ir_config_parameter
+msgid "ir.config_parameter"
+msgstr ""
diff --git a/web_m2x_options/i18n/pt_BR.po b/web_m2x_options/i18n/pt_BR.po
index 538bfc7e7930..a36dba9b1a35 100644
--- a/web_m2x_options/i18n/pt_BR.po
+++ b/web_m2x_options/i18n/pt_BR.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options
-#
+#
# Translators:
# OCA Transbot , 2017
# Rodrigo de Almeida Sottomaior Macedo , 2017
@@ -11,77 +11,95 @@ msgstr ""
"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: Rodrigo de Almeida Sottomaior Macedo , 2017\n"
-"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n"
+"Last-Translator: Rodrigo de Almeida Sottomaior Macedo "
+", 2017\n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
+"teams/23907/pt_BR/)\n"
+"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: web_m2x_options
#. openerp-web
#: code:addons/web_m2x_options/static/src/xml/base.xml:8
-#, python-format
-msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+#, fuzzy, python-format
+msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
msgstr "!(widget.options.no_open || widget.options.no_open_edit)"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:47
+#: code:addons/web_m2x_options/static/src/js/form.js:52
#, python-format
msgid "Cancel"
msgstr "Cancelar"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:33
+#: code:addons/web_m2x_options/static/src/js/form.js:31
#, python-format
msgid "Create"
msgstr "Criar"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:232
-#: code:addons/web_m2x_options/static/src/js/form.js:382
+#: code:addons/web_m2x_options/static/src/js/form.js:241
#, python-format
msgid "Create \"%s\""
msgstr "Criar \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:30
+#: code:addons/web_m2x_options/static/src/js/form.js:28
#, python-format
msgid "Create a %s"
msgstr "Criar um %s"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:250
-#: code:addons/web_m2x_options/static/src/js/form.js:401
+#: code:addons/web_m2x_options/static/src/js/form.js:261
#, python-format
msgid "Create and Edit..."
msgstr "Criar e editar.."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:43
+#: code:addons/web_m2x_options/static/src/js/form.js:42
#, python-format
msgid "Create and edit"
msgstr "Criar e editar"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:201
-#: code:addons/web_m2x_options/static/src/js/form.js:358
+#: code:addons/web_m2x_options/static/src/js/form.js:267
+#, python-format
+msgid "No results to show..."
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:341
+#, python-format
+msgid "Open: "
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:206
#, python-format
msgid "Search More..."
msgstr "Buscar mais..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:52
+#: code:addons/web_m2x_options/static/src/js/form.js:58
#, python-format
msgid "You are creating a new %s, are you sure it does not exist yet?"
msgstr ""
"Você está criando um novo %s, você tem certeza de que ainda não existe?"
+
+#. module: web_m2x_options
+#: model:ir.model,name:web_m2x_options.model_ir_config_parameter
+msgid "ir.config_parameter"
+msgstr ""
diff --git a/web_m2x_options/i18n/sl.po b/web_m2x_options/i18n/sl.po
index a4e3ae1f3184..6aa7a7e2eaa5 100644
--- a/web_m2x_options/i18n/sl.po
+++ b/web_m2x_options/i18n/sl.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -12,74 +12,91 @@ msgstr ""
"PO-Revision-Date: 2018-01-03 03:50+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
+"Language: sl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: sl\n"
-"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
+"%100==4 ? 2 : 3);\n"
#. module: web_m2x_options
#. openerp-web
#: code:addons/web_m2x_options/static/src/xml/base.xml:8
#, python-format
-msgid "!(widget.options.no_open || widget.options.no_open_edit)"
+msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:47
+#: code:addons/web_m2x_options/static/src/js/form.js:52
#, python-format
msgid "Cancel"
msgstr "Preklic"
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:33
+#: code:addons/web_m2x_options/static/src/js/form.js:31
#, python-format
msgid "Create"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:232
-#: code:addons/web_m2x_options/static/src/js/form.js:382
+#: code:addons/web_m2x_options/static/src/js/form.js:241
#, python-format
msgid "Create \"%s\""
msgstr "Ustvari \"%s\""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:30
+#: code:addons/web_m2x_options/static/src/js/form.js:28
#, python-format
msgid "Create a %s"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:250
-#: code:addons/web_m2x_options/static/src/js/form.js:401
+#: code:addons/web_m2x_options/static/src/js/form.js:261
#, python-format
msgid "Create and Edit..."
msgstr "Ustvari in urejaj..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:43
+#: code:addons/web_m2x_options/static/src/js/form.js:42
#, python-format
msgid "Create and edit"
msgstr ""
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:201
-#: code:addons/web_m2x_options/static/src/js/form.js:358
+#: code:addons/web_m2x_options/static/src/js/form.js:267
+#, python-format
+msgid "No results to show..."
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:341
+#, python-format
+msgid "Open: "
+msgstr ""
+
+#. module: web_m2x_options
+#. openerp-web
+#: code:addons/web_m2x_options/static/src/js/form.js:206
#, python-format
msgid "Search More..."
msgstr "Poišči več..."
#. module: web_m2x_options
#. openerp-web
-#: code:addons/web_m2x_options/static/src/js/form.js:52
+#: code:addons/web_m2x_options/static/src/js/form.js:58
#, python-format
msgid "You are creating a new %s, are you sure it does not exist yet?"
msgstr ""
+
+#. module: web_m2x_options
+#: model:ir.model,name:web_m2x_options.model_ir_config_parameter
+msgid "ir.config_parameter"
+msgstr ""
diff --git a/web_m2x_options/i18n/tr.po b/web_m2x_options/i18n/tr.po
index 584219f2c764..527dc0872a86 100644
--- a/web_m2x_options/i18n/tr.po
+++ b/web_m2x_options/i18n/tr.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -12,74 +12,90 @@ msgstr ""
"PO-Revision-Date: 2018-01-03 03:50+0000\n"
"Last-Translator: OCA Transbot