[MERGE] Merge main trunk and remove conflicts.
bzr revid: jra@tinyerp.com-20121121052637-cw55pw6vktwjp1jy bzr revid: bth@tinyerp.com-20121123091806-tibbw3oa212wryia
This commit is contained in:
commit
fce01bb78c
|
@ -345,7 +345,13 @@ def make_conditional(req, response, last_modified=None, etag=None):
|
|||
return response.make_conditional(req.httprequest)
|
||||
|
||||
def login_and_redirect(req, db, login, key, redirect_url='/'):
|
||||
req.session.authenticate(db, login, key, {})
|
||||
wsgienv = req.httprequest.environ
|
||||
env = dict(
|
||||
base_location=req.httprequest.url_root.rstrip('/'),
|
||||
HTTP_HOST=wsgienv['HTTP_HOST'],
|
||||
REMOTE_ADDR=wsgienv['REMOTE_ADDR'],
|
||||
)
|
||||
req.session.authenticate(db, login, key, env)
|
||||
return set_cookie_and_redirect(req, redirect_url)
|
||||
|
||||
def set_cookie_and_redirect(req, redirect_url):
|
||||
|
@ -1746,6 +1752,8 @@ class Export(View):
|
|||
def fields_info(self, req, model, export_fields):
|
||||
info = {}
|
||||
fields = self.fields_get(req, model)
|
||||
if ".id" in export_fields:
|
||||
fields['.id'] = fields.pop('id', {'string': 'ID'})
|
||||
|
||||
# To make fields retrieval more efficient, fetch all sub-fields of a
|
||||
# given field at the same time. Because the order in the export list is
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openerp-web\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
|
||||
"PO-Revision-Date: 2012-02-15 10:35+0000\n"
|
||||
"Last-Translator: Olivier Dony (OpenERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2012-11-21 16:26+0000\n"
|
||||
"Last-Translator: Quentin THEURET <Unknown>\n"
|
||||
"Language-Team: French <fr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-11-15 05:08+0000\n"
|
||||
"X-Generator: Launchpad (build 16265)\n"
|
||||
"X-Launchpad-Export-Date: 2012-11-22 05:15+0000\n"
|
||||
"X-Generator: Launchpad (build 16293)\n"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/chrome.js:176
|
||||
|
@ -129,29 +129,29 @@ msgstr "OpenERP - Version communautaire/non supportée"
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:619
|
||||
msgid "less than a minute ago"
|
||||
msgstr ""
|
||||
msgstr "il y a moins d'une minute"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:620
|
||||
msgid "about a minute ago"
|
||||
msgstr ""
|
||||
msgstr "il y a une minute"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:621
|
||||
#, python-format
|
||||
msgid "%d minutes ago"
|
||||
msgstr ""
|
||||
msgstr "il y a %d minutes"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:622
|
||||
msgid "about an hour ago"
|
||||
msgstr ""
|
||||
msgstr "il y a une heure"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:623
|
||||
#, python-format
|
||||
msgid "%d hours ago"
|
||||
msgstr ""
|
||||
msgstr "il y a %d heures"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:624
|
||||
|
@ -162,23 +162,23 @@ msgstr ""
|
|||
#: addons/web/static/src/js/coresetup.js:625
|
||||
#, python-format
|
||||
msgid "%d days ago"
|
||||
msgstr ""
|
||||
msgstr "il y a %d jours"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:626
|
||||
msgid "about a month ago"
|
||||
msgstr ""
|
||||
msgstr "il y a un mois"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:627
|
||||
#, python-format
|
||||
msgid "%d months ago"
|
||||
msgstr ""
|
||||
msgstr "il y a %d mois"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:628
|
||||
msgid "about a year ago"
|
||||
msgstr ""
|
||||
msgstr "il y a un an"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/coresetup.js:629
|
||||
|
@ -243,17 +243,19 @@ msgid ""
|
|||
"Destination fields should only be selected once, some fields are selected "
|
||||
"more than once:"
|
||||
msgstr ""
|
||||
"Les champs de destination ne devraient être sélectionnés qu'une seule fois, "
|
||||
"plusieurs champs ont été sélectionnés plusieurs fois:"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/data_import.js:386
|
||||
msgid "*Required Fields are not selected :"
|
||||
msgstr ""
|
||||
msgstr "*Les champs requis ne sont pas sélectionnés :"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/formats.js:139
|
||||
#, python-format
|
||||
msgid "(%d records)"
|
||||
msgstr ""
|
||||
msgstr "(%d enregistrements)"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/js/formats.js:325
|
||||
|
@ -1120,7 +1122,7 @@ msgstr ""
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:523
|
||||
msgid "/web/binary/upload_attachment"
|
||||
msgstr ""
|
||||
msgstr "/web/binary/upload_attachment"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:527
|
||||
|
@ -1136,7 +1138,7 @@ msgstr ""
|
|||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:687
|
||||
msgid "Discard"
|
||||
msgstr ""
|
||||
msgstr "Annuler"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web/static/src/xml/base.xml:806
|
||||
|
|
|
@ -698,7 +698,7 @@ QWeb2.Element = (function() {
|
|||
this.top("debugger;");
|
||||
},
|
||||
compile_action_log : function(value) {
|
||||
this.top("console.log(" + this.format_expression(value) + "});");
|
||||
this.top("console.log(" + this.format_expression(value) + ");");
|
||||
}
|
||||
});
|
||||
return Element;
|
||||
|
|
|
@ -1197,7 +1197,7 @@
|
|||
color: white;
|
||||
padding: 2px 4px;
|
||||
margin: 1px 6px 0 0;
|
||||
border: 1px solid lightGray;
|
||||
border: 1px solid lightgrey;
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
|
@ -1222,7 +1222,7 @@
|
|||
transform: scale(1.1);
|
||||
}
|
||||
.openerp .oe_secondary_submenu .oe_active {
|
||||
border-top: 1px solid lightGray;
|
||||
border-top: 1px solid lightgrey;
|
||||
border-bottom: 1px solid #dedede;
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
-moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 -1px 3px rgba(40, 40, 40, 0.2);
|
||||
|
@ -1404,60 +1404,6 @@
|
|||
.openerp .oe_view_manager table.oe_view_manager_header .oe_view_manager_buttons {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.openerp .oe_view_manager .oe_view_manager_pager {
|
||||
line-height: 26px;
|
||||
}
|
||||
.openerp .oe_view_manager .oe_view_manager_pager .oe_list_pager_single_page .oe_pager_group {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_view_manager .oe_pager_value {
|
||||
float: left;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.openerp .oe_view_manager ul.oe_pager_group {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.openerp .oe_view_manager .oe_pager_group {
|
||||
float: left;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
display: inline-block;
|
||||
border: 1px solid #ababab;
|
||||
cursor: pointer;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.openerp .oe_view_manager .oe_pager_group li {
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style-type: none;
|
||||
float: left;
|
||||
border-right: 1px solid #ababab;
|
||||
}
|
||||
.openerp .oe_view_manager .oe_pager_group li:last-child {
|
||||
border: none;
|
||||
}
|
||||
.openerp .oe_view_manager .oe_pager_group a {
|
||||
color: #4c4c4c;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.openerp .oe_view_manager .oe_pager_group a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.openerp .oe_view_manager .oe_pager_group .active {
|
||||
background: #999999;
|
||||
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
|
||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
|
||||
}
|
||||
.openerp .oe_view_manager .oe_pager_group .active a {
|
||||
color: white;
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
.openerp .oe_view_manager .oe_view_manager_switch {
|
||||
padding: 0;
|
||||
margin: 0 0 0 8px;
|
||||
|
@ -1506,6 +1452,60 @@
|
|||
.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_diagram:after {
|
||||
content: "f";
|
||||
}
|
||||
.openerp .oe_list_pager {
|
||||
line-height: 26px;
|
||||
}
|
||||
.openerp .oe_list_pager .oe_pager_value {
|
||||
float: left;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.openerp .oe_list_pager ul.oe_pager_group {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.openerp .oe_list_pager .oe_pager_group {
|
||||
float: left;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
display: inline-block;
|
||||
border: 1px solid #ababab;
|
||||
cursor: pointer;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.openerp .oe_list_pager .oe_pager_group li {
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style-type: none;
|
||||
float: left;
|
||||
border-right: 1px solid #ababab;
|
||||
}
|
||||
.openerp .oe_list_pager .oe_pager_group li:last-child {
|
||||
border: none;
|
||||
}
|
||||
.openerp .oe_list_pager .oe_pager_group a {
|
||||
color: #4c4c4c;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.openerp .oe_list_pager .oe_pager_group a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.openerp .oe_list_pager .oe_pager_group .active {
|
||||
background: #999999;
|
||||
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
|
||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
|
||||
}
|
||||
.openerp .oe_list_pager .oe_pager_group .active a {
|
||||
color: white;
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
.openerp .oe_list_pager.oe_list_pager_single_page .oe_pager_group {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_view_manager_current {
|
||||
height: 100%;
|
||||
}
|
||||
|
@ -1537,6 +1537,9 @@
|
|||
.openerp .oe_popup_form > .oe_formview > .oe_form_pager {
|
||||
display: none !important;
|
||||
}
|
||||
.openerp .oe_popup_list_pager {
|
||||
float: right;
|
||||
}
|
||||
.openerp .oe_searchview {
|
||||
cursor: text;
|
||||
position: relative;
|
||||
|
@ -1859,6 +1862,7 @@
|
|||
padding: 0;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced li {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
|
@ -2147,7 +2151,7 @@
|
|||
}
|
||||
.openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span {
|
||||
font-size: 80%;
|
||||
color: darkGreen;
|
||||
color: darkgreen;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
top: -4px;
|
||||
|
|
|
@ -1136,47 +1136,6 @@ $sheet-padding: 16px
|
|||
.oe_view_manager_buttons
|
||||
white-space: nowrap
|
||||
// }}}
|
||||
// ViewManager.pager {{{
|
||||
.oe_view_manager_pager
|
||||
line-height: 26px
|
||||
.oe_list_pager_single_page .oe_pager_group
|
||||
display: none
|
||||
.oe_pager_value
|
||||
float: left
|
||||
margin-right: 8px
|
||||
ul.oe_pager_group
|
||||
padding: 0
|
||||
margin: 0
|
||||
.oe_pager_group
|
||||
float: left
|
||||
height: 24px
|
||||
line-height: 24px
|
||||
display: inline-block
|
||||
border: 1px solid #ababab
|
||||
cursor: pointer
|
||||
@include radius(5px)
|
||||
li
|
||||
height: 24px
|
||||
line-height: 24px
|
||||
padding: 0
|
||||
margin: 0
|
||||
list-style-type: none
|
||||
float: left
|
||||
border-right: 1px solid #ababab
|
||||
&:last-child
|
||||
border: none
|
||||
a
|
||||
color: #4c4c4c
|
||||
padding: 0 8px
|
||||
&:hover
|
||||
text-decoration: none
|
||||
.active
|
||||
background: #999
|
||||
@include box-shadow(0 1px 4px rgba(0,0,0,0.3) inset)
|
||||
a
|
||||
color: #fff
|
||||
text-shadow: 0 1px 2px rgba(0,0,0,0.4)
|
||||
// }}}
|
||||
// ViewManager.switches {{{
|
||||
.oe_view_manager_switch
|
||||
padding: 0
|
||||
|
@ -1217,6 +1176,47 @@ $sheet-padding: 16px
|
|||
.oe_vm_switch_diagram:after
|
||||
content: "f"
|
||||
// }}}
|
||||
// List pager {{{
|
||||
.oe_list_pager
|
||||
line-height: 26px
|
||||
.oe_pager_value
|
||||
float: left
|
||||
margin-right: 8px
|
||||
ul.oe_pager_group
|
||||
padding: 0
|
||||
margin: 0
|
||||
.oe_pager_group
|
||||
float: left
|
||||
height: 24px
|
||||
line-height: 24px
|
||||
display: inline-block
|
||||
border: 1px solid #ababab
|
||||
cursor: pointer
|
||||
@include radius(5px)
|
||||
li
|
||||
height: 24px
|
||||
line-height: 24px
|
||||
padding: 0
|
||||
margin: 0
|
||||
list-style-type: none
|
||||
float: left
|
||||
border-right: 1px solid #ababab
|
||||
&:last-child
|
||||
border: none
|
||||
a
|
||||
color: #4c4c4c
|
||||
padding: 0 8px
|
||||
&:hover
|
||||
text-decoration: none
|
||||
.active
|
||||
background: #999
|
||||
@include box-shadow(0 1px 4px rgba(0,0,0,0.3) inset)
|
||||
a
|
||||
color: #fff
|
||||
text-shadow: 0 1px 2px rgba(0,0,0,0.4)
|
||||
.oe_list_pager.oe_list_pager_single_page .oe_pager_group
|
||||
display: none
|
||||
// }}}
|
||||
// ViewManager application {{{
|
||||
.oe_view_manager_current
|
||||
height: 100%
|
||||
|
@ -1237,9 +1237,11 @@ $sheet-padding: 16px
|
|||
> .oe_view_manager_header
|
||||
display: none
|
||||
// }}}
|
||||
// Viewmanager popup {{{
|
||||
// FormPopup {{{
|
||||
.oe_popup_form > .oe_formview > .oe_form_pager
|
||||
display: none !important
|
||||
.oe_popup_list_pager
|
||||
float: right
|
||||
// }}}
|
||||
// SearchView {{{
|
||||
.oe_searchview
|
||||
|
@ -1486,6 +1488,7 @@ $sheet-padding: 16px
|
|||
list-style: none
|
||||
padding: 0
|
||||
li
|
||||
cursor: pointer
|
||||
position: relative
|
||||
list-style: none
|
||||
margin: 0
|
||||
|
|
|
@ -52,8 +52,27 @@ instance.web.dialog = function(element) {
|
|||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
A useful class to handle dialogs.
|
||||
|
||||
Attributes:
|
||||
- $buttons: A jQuery element targeting a dom part where buttons can be added. It always exists
|
||||
during the lifecycle of the dialog.
|
||||
*/
|
||||
instance.web.Dialog = instance.web.Widget.extend({
|
||||
dialog_title: "",
|
||||
/**
|
||||
Constructor.
|
||||
|
||||
@param {Widget} parent
|
||||
@param {dictionary} options A dictionary that will be forwarded to jQueryUI Dialog. Additionaly, that
|
||||
dictionary can contain the following keys:
|
||||
- buttons: The buttons key is not propagated to jQueryUI Dialog. It must be a dictionary (key = button label,
|
||||
value = click handler) or a list of dictionaries (each element in the dictionary is send to the corresponding
|
||||
method of a jQuery element targeting the <button> tag).
|
||||
- destroy_on_close: Default true. If true and the dialog is closed, it is automatically destroyed.
|
||||
@param {jQuery object} content Some content to replace this.$el .
|
||||
*/
|
||||
init: function (parent, options, content) {
|
||||
var self = this;
|
||||
this._super(parent);
|
||||
|
@ -81,6 +100,7 @@ instance.web.Dialog = instance.web.Widget.extend({
|
|||
_.extend(this.dialog_options, options);
|
||||
}
|
||||
this.on("closing", this, this._closing);
|
||||
this.$buttons = $('<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"><span class="oe_dialog_custom_buttons"/></div>');
|
||||
},
|
||||
_get_options: function(options) {
|
||||
var self = this;
|
||||
|
@ -90,7 +110,7 @@ instance.web.Dialog = instance.web.Widget.extend({
|
|||
height: $(window.top).height(),
|
||||
};
|
||||
_.each(sizes, function(available_size, unit) {
|
||||
o[unit] = self._get_size(o[unit]);
|
||||
o[unit] = self._get_size(o[unit], available_size);
|
||||
o['min_' + unit] = self._get_size(o['min_' + unit] || 0, available_size);
|
||||
o['max_' + unit] = self._get_size(o['max_' + unit] || 0, available_size);
|
||||
if (o[unit] !== 'auto' && o['min_' + unit] && o[unit] < o['min_' + unit]) {
|
||||
|
@ -120,26 +140,23 @@ instance.web.Dialog = instance.web.Widget.extend({
|
|||
this._super();
|
||||
}
|
||||
},
|
||||
/**
|
||||
Opens the popup. Inits the dialog if it is not already inited.
|
||||
|
||||
@param {dictionary} options Additional options, see the options param in init().
|
||||
@return this
|
||||
*/
|
||||
open: function(options) {
|
||||
var o = this._get_options(options);
|
||||
if (!this.dialog_inited) {
|
||||
this.init_dialog(o);
|
||||
}
|
||||
if (o.buttons) {
|
||||
this._add_buttons(o.buttons);
|
||||
delete(o.buttons);
|
||||
}
|
||||
this.$buttons.appendTo($("body"));
|
||||
instance.web.dialog(this.$el, o).dialog('open');
|
||||
this.$el.dialog("widget").find(".ui-dialog-buttonpane").remove();
|
||||
this.$buttons.appendTo(this.$el.dialog("widget"));
|
||||
if (o.height === 'auto' && o.max_height) {
|
||||
this.$el.css({ 'max-height': o.max_height, 'overflow-y': 'auto' });
|
||||
this.init_dialog(options);
|
||||
}
|
||||
this.$el.dialog('open');
|
||||
this.$el.dialog("widget").append(this.$buttons);
|
||||
return this;
|
||||
},
|
||||
_add_buttons: function(buttons) {
|
||||
var self = this;
|
||||
var $customButons = this.$buttons.find('.oe_dialog_custom_buttons').empty();
|
||||
_.each(buttons, function(fn, text) {
|
||||
// buttons can be object or array
|
||||
if (!_.isFunction(fn)) {
|
||||
|
@ -147,21 +164,36 @@ instance.web.Dialog = instance.web.Widget.extend({
|
|||
fn = fn.click;
|
||||
}
|
||||
var $but = $(QWeb.render('WidgetButton', { widget : { string: text, node: { attrs: {} }}}));
|
||||
self.$buttons.append($but);
|
||||
$customButons.append($but);
|
||||
$but.on('click', function(ev) {
|
||||
fn.call(self.$el, ev);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
Initializes the popup.
|
||||
|
||||
@param {dictionary} options Additional options, see the options param in init().
|
||||
@return The result returned by start().
|
||||
*/
|
||||
init_dialog: function(options) {
|
||||
var options = this._get_options(options);
|
||||
if (options.buttons) {
|
||||
this._add_buttons(options.buttons);
|
||||
delete(options.buttons);
|
||||
}
|
||||
this.renderElement();
|
||||
instance.web.dialog(this.$el, options);
|
||||
this.$buttons = $('<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" />');
|
||||
this.$el.dialog("widget").append(this.$buttons);
|
||||
if (options.height === 'auto' && options.max_height) {
|
||||
this.$el.css({ 'max-height': options.max_height, 'overflow-y': 'auto' });
|
||||
}
|
||||
this.dialog_inited = true;
|
||||
var res = this.start();
|
||||
return res;
|
||||
},
|
||||
/**
|
||||
Closes the popup, if destroy_on_close was passed to the constructor, it is also destroyed.
|
||||
*/
|
||||
close: function() {
|
||||
if (this.dialog_inited && this.$el.is(":data(dialog)")) {
|
||||
this.$el.dialog('close');
|
||||
|
@ -176,7 +208,11 @@ instance.web.Dialog = instance.web.Widget.extend({
|
|||
this.__tmp_dialog_closing = undefined;
|
||||
}
|
||||
},
|
||||
/**
|
||||
Destroys the popup, also closes it.
|
||||
*/
|
||||
destroy: function () {
|
||||
this.$buttons.remove();
|
||||
_.each(this.getChildren(), function(el) {
|
||||
el.destroy();
|
||||
});
|
||||
|
@ -185,7 +221,7 @@ instance.web.Dialog = instance.web.Widget.extend({
|
|||
this.close();
|
||||
this.__tmp_dialog_destroying = undefined;
|
||||
}
|
||||
if (this.dialog_inited && !this.isDestroyed()) {
|
||||
if (this.dialog_inited && !this.isDestroyed() && this.$el.is(":data(dialog)")) {
|
||||
this.$el.dialog('destroy');
|
||||
}
|
||||
this._super();
|
||||
|
@ -1157,7 +1193,6 @@ instance.web.WebClient = instance.web.Client.extend({
|
|||
},
|
||||
start: function() {
|
||||
var self = this;
|
||||
|
||||
return $.when(this._super()).pipe(function() {
|
||||
self.$el.on('contextmenu','.oe_logo',function(e) {
|
||||
self.$el.find('.resolution').remove();
|
||||
|
@ -1216,9 +1251,7 @@ instance.web.WebClient = instance.web.Client.extend({
|
|||
});
|
||||
});
|
||||
});
|
||||
self.$el.on('click', '.oe_logo', function(e) {
|
||||
self.action_manager.do_action('home');
|
||||
});
|
||||
self.$(".oe_logo").attr("href", $.param.fragment("" + window.location, "", 2));
|
||||
if (jQuery.param !== undefined && jQuery.deparam(jQuery.param.querystring()).kitten !== undefined) {
|
||||
$("body").addClass("kitten-mode-activated");
|
||||
if ($.blockUI) {
|
||||
|
|
|
@ -543,12 +543,12 @@ instance.web._lt = function (s) {
|
|||
return {toString: function () { return instance.web._t(s); }}
|
||||
};
|
||||
instance.web.qweb = new QWeb2.Engine();
|
||||
instance.web.qweb.default_dict['__debug__'] = instance.session.debug; // Which one ?
|
||||
instance.web.qweb.debug = instance.session.debug;
|
||||
instance.web.qweb.default_dict = {
|
||||
'_' : _,
|
||||
'_t' : instance.web._t,
|
||||
'JSON': JSON,
|
||||
'__debug__': instance.session.debug,
|
||||
};
|
||||
instance.web.qweb.preprocess_node = function() {
|
||||
// Note that 'this' is the Qweb Node
|
||||
|
|
|
@ -1893,6 +1893,9 @@ instance.web.search.ExtendedSearchProposition.DateTime = instance.web.search.Ext
|
|||
get_value: function() {
|
||||
return this.datewidget.get_value();
|
||||
},
|
||||
toString: function () {
|
||||
return instance.web.format_value(this.get_value(), { type:"datetime" });
|
||||
},
|
||||
start: function() {
|
||||
var ready = this._super();
|
||||
this.datewidget = new (this.widget())(this);
|
||||
|
@ -1901,7 +1904,10 @@ instance.web.search.ExtendedSearchProposition.DateTime = instance.web.search.Ext
|
|||
}
|
||||
});
|
||||
instance.web.search.ExtendedSearchProposition.Date = instance.web.search.ExtendedSearchProposition.DateTime.extend({
|
||||
widget: function () { return instance.web.DateWidget; }
|
||||
widget: function () { return instance.web.DateWidget; },
|
||||
toString: function () {
|
||||
return instance.web.format_value(this.get_value(), { type:"date" });
|
||||
}
|
||||
});
|
||||
instance.web.search.ExtendedSearchProposition.Integer = instance.web.search.ExtendedSearchProposition.Field.extend({
|
||||
template: 'SearchView.extended_search.proposition.integer',
|
||||
|
|
|
@ -196,7 +196,6 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
this.sidebar.add_items('other', _.compact([
|
||||
self.is_action_enabled('delete') && { label: _t('Delete'), callback: self.on_button_delete },
|
||||
self.is_action_enabled('create') && { label: _t('Duplicate'), callback: self.on_button_duplicate },
|
||||
{ label: _t('Set Default'), callback: function (item) { self.open_defaults_dialog(); } }
|
||||
]));
|
||||
}
|
||||
|
||||
|
@ -4042,6 +4041,9 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
|
|||
}
|
||||
this._super(value_);
|
||||
},
|
||||
is_false: function() {
|
||||
return _(this.get("value")).isEmpty();
|
||||
},
|
||||
get_value: function() {
|
||||
var tmp = [commands.replace_with(this.get("value"))];
|
||||
return tmp;
|
||||
|
@ -4644,6 +4646,8 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend
|
|||
'selectable': !self.options.disable_multiple_selection,
|
||||
'import_enabled': false,
|
||||
'$buttons': self.$buttonpane,
|
||||
'disable_editable_mode': true,
|
||||
'$pager': self.$('.oe_popup_list_pager'),
|
||||
}, self.options.list_view_options || {}));
|
||||
self.view_list.on('edit:before', self, function (e) {
|
||||
e.cancel = true;
|
||||
|
@ -4803,6 +4807,7 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
|
|||
this._super(field_manager, node);
|
||||
this.binary_value = false;
|
||||
this.useFileAPI = !!window.FileReader;
|
||||
this.max_upload_size = 25 * 1024 * 1024; // 25Mo
|
||||
if (!this.useFileAPI) {
|
||||
this.fileupload_id = _.uniqueId('oe_fileupload');
|
||||
$(window).on(this.fileupload_id, function() {
|
||||
|
@ -4828,6 +4833,11 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
|
|||
if ((this.useFileAPI && file_node.files.length) || (!this.useFileAPI && $(file_node).val() !== '')) {
|
||||
if (this.useFileAPI) {
|
||||
var file = file_node.files[0];
|
||||
if (file.size > this.max_upload_size) {
|
||||
var msg = _t("The selected file exceed the maximum file size of %s.");
|
||||
instance.webclient.notification.warn(_t("File upload"), _.str.sprintf(msg, instance.web.human_size(this.max_upload_size)));
|
||||
return false;
|
||||
}
|
||||
var filereader = new FileReader();
|
||||
filereader.readAsDataURL(file);
|
||||
filereader.onloadend = function(upload) {
|
||||
|
|
|
@ -21,6 +21,8 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
|||
// whether the view rows can be reordered (via vertical drag & drop)
|
||||
'reorderable': true,
|
||||
'action_buttons': true,
|
||||
//whether the editable property of the view has to be disabled
|
||||
'disable_editable_mode': false,
|
||||
},
|
||||
view_type: 'tree',
|
||||
/**
|
||||
|
|
|
@ -88,9 +88,10 @@ openerp.web.list_editable = function (instance) {
|
|||
});
|
||||
},
|
||||
editable: function () {
|
||||
return this.fields_view.arch.attrs.editable
|
||||
return !this.options.disable_editable_mode
|
||||
&& (this.fields_view.arch.attrs.editable
|
||||
|| this._context_editable
|
||||
|| this.options.editable;
|
||||
|| this.options.editable);
|
||||
},
|
||||
/**
|
||||
* Replace do_search to handle editability process
|
||||
|
|
|
@ -319,7 +319,6 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
|||
dialogClass: executor.klass,
|
||||
});
|
||||
this.dialog.on("closing", null, options.on_close);
|
||||
this.dialog.init_dialog();
|
||||
this.dialog.dialog_title = executor.action.name;
|
||||
if (widget instanceof instance.web.ViewManager) {
|
||||
_.extend(widget.flags, {
|
||||
|
@ -810,6 +809,9 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
|
|||
case 'toggle_layout_outline':
|
||||
current_view.rendering_engine.toggle_layout_debugging();
|
||||
break;
|
||||
case 'set_defaults':
|
||||
current_view.open_defaults_dialog();
|
||||
break;
|
||||
case 'translate':
|
||||
this.do_action({
|
||||
name: "Technical Translation",
|
||||
|
@ -1332,7 +1334,7 @@ instance.web.View = instance.web.Widget.extend({
|
|||
new instance.web.DataExport(this, this.dataset).open();
|
||||
},
|
||||
sidebar_eval_context: function () {
|
||||
return $.when();
|
||||
return $.when({});
|
||||
},
|
||||
/**
|
||||
* Asks the view to reload itself, if the reloading is asynchronous should
|
||||
|
|
|
@ -538,8 +538,11 @@
|
|||
</t>
|
||||
<t t-name="ViewManagerDebug">
|
||||
<option value="">Debug View#<t t-esc="view.fields_view.view_id"/></option>
|
||||
<option t-if="view_manager.active_view === 'form'" value="perm_read" data-views="form,page">View Log (perm_read)</option>
|
||||
<option t-if="view_manager.active_view === 'form'" value="toggle_layout_outline">Toggle Form Layout Outline</option>
|
||||
<t t-if="view_manager.active_view === 'form'">
|
||||
<option value="perm_read">View Log (perm_read)</option>
|
||||
<option value="toggle_layout_outline">Toggle Form Layout Outline</option>
|
||||
<option value="set_defaults">Set Defaults</option>
|
||||
</t>
|
||||
<option value="tests">JS Tests</option>
|
||||
<option value="fields">View Fields</option>
|
||||
<option value="fvg">Fields View Get</option>
|
||||
|
@ -1338,6 +1341,11 @@
|
|||
<div class="oe_popup_search" style="width:100%"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="width:100%">
|
||||
<td style="width:100%">
|
||||
<div class="oe_popup_list_pager"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="width:100%">
|
||||
<td style="width:100%">
|
||||
<div class="oe_popup_list" style="width:100%"></div>
|
||||
|
|
|
@ -245,11 +245,6 @@ instance.web_calendar.CalendarView = instance.web.View.extend({
|
|||
refresh_scheduler: function() {
|
||||
scheduler.setCurrentView(scheduler._date);
|
||||
},
|
||||
refresh_minical: function() {
|
||||
if (this.sidebar) {
|
||||
scheduler.updateCalendar(this.sidebar.mini_calendar);
|
||||
}
|
||||
},
|
||||
reload_event: function(id) {
|
||||
this.dataset.read_ids([id], _.keys(this.fields)).done(this.proxy('events_loaded'));
|
||||
},
|
||||
|
@ -306,7 +301,6 @@ instance.web_calendar.CalendarView = instance.web.View.extend({
|
|||
}
|
||||
scheduler.parse(res_events, 'json');
|
||||
this.refresh_scheduler();
|
||||
this.refresh_minical();
|
||||
if (!no_filter_reload && this.sidebar) {
|
||||
this.sidebar.filter.events_loaded(sidebar_items);
|
||||
}
|
||||
|
@ -402,9 +396,7 @@ instance.web_calendar.CalendarView = instance.web.View.extend({
|
|||
var index = this.dataset.get_id_index(event_id);
|
||||
if (index !== null) {
|
||||
event_id = this.dataset.ids[index];
|
||||
this.dataset.write(event_id, data, {}).done(function() {
|
||||
self.refresh_minical();
|
||||
});
|
||||
this.dataset.write(event_id, data, {});
|
||||
}
|
||||
},
|
||||
quick_create: function(event_id, event_obj) {
|
||||
|
@ -414,7 +406,6 @@ instance.web_calendar.CalendarView = instance.web.View.extend({
|
|||
var id = r;
|
||||
self.dataset.ids.push(id);
|
||||
scheduler.changeEventId(event_id, id);
|
||||
self.refresh_minical();
|
||||
self.reload_event(id);
|
||||
}).fail(function(r, event) {
|
||||
event.preventDefault();
|
||||
|
@ -487,9 +478,7 @@ instance.web_calendar.CalendarView = instance.web.View.extend({
|
|||
var self = this;
|
||||
var index = this.dataset.get_id_index(event_id);
|
||||
if (index !== null) {
|
||||
this.dataset.unlink(event_id).done(function() {
|
||||
self.refresh_minical();
|
||||
});
|
||||
this.dataset.unlink(event_id);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -506,6 +495,7 @@ instance.web_calendar.Sidebar = instance.web.Widget.extend({
|
|||
scheduler.setCurrentView(date, 'day');
|
||||
}
|
||||
});
|
||||
scheduler.linkCalendar(this.mini_calendar);
|
||||
this.filter = new instance.web_calendar.SidebarFilter(this, this.getParent());
|
||||
this.filter.appendTo(this.$el.find('.oe_calendar_filter'));
|
||||
}
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openerp-web\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
|
||||
"PO-Revision-Date: 2012-02-15 09:18+0000\n"
|
||||
"Last-Translator: Olivier Dony (OpenERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2012-11-22 08:35+0000\n"
|
||||
"Last-Translator: Quentin THEURET <Unknown>\n"
|
||||
"Language-Team: French <fr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-11-15 05:09+0000\n"
|
||||
"X-Generator: Launchpad (build 16265)\n"
|
||||
"X-Launchpad-Export-Date: 2012-11-23 05:13+0000\n"
|
||||
"X-Generator: Launchpad (build 16293)\n"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_graph/static/src/js/graph.js:19
|
||||
|
@ -45,27 +45,27 @@ msgstr ""
|
|||
#. openerp-web
|
||||
#: addons/web_graph/static/src/xml/web_graph.xml:14
|
||||
msgid "Lines"
|
||||
msgstr ""
|
||||
msgstr "Lignes"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_graph/static/src/xml/web_graph.xml:15
|
||||
msgid "Areas"
|
||||
msgstr ""
|
||||
msgstr "Zones"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_graph/static/src/xml/web_graph.xml:18
|
||||
msgid "Radar"
|
||||
msgstr ""
|
||||
msgstr "Radar"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_graph/static/src/xml/web_graph.xml:20
|
||||
msgid "Legend"
|
||||
msgstr ""
|
||||
msgstr "Légende"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_graph/static/src/xml/web_graph.xml:24
|
||||
msgid "Hidden"
|
||||
msgstr ""
|
||||
msgstr "Masqué"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_graph/static/src/xml/web_graph.xml:25
|
||||
|
@ -75,12 +75,12 @@ msgstr ""
|
|||
#. openerp-web
|
||||
#: addons/web_graph/static/src/xml/web_graph.xml:26
|
||||
msgid "Top"
|
||||
msgstr ""
|
||||
msgstr "En haut"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_graph/static/src/xml/web_graph.xml:28
|
||||
msgid "Actions"
|
||||
msgstr ""
|
||||
msgstr "Actions"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_graph/static/src/xml/web_graph.xml:32
|
||||
|
|
|
@ -16,7 +16,7 @@ instance.web.SearchView = instance.web.SearchView.extend({
|
|||
instance.web.Login = instance.web.Login.extend({
|
||||
start: function() {
|
||||
console.log('Hello there');
|
||||
this._super.apply(this,arguments);
|
||||
return this._super.apply(this,arguments);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openerp-web\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
|
||||
"PO-Revision-Date: 2012-02-15 10:37+0000\n"
|
||||
"Last-Translator: Olivier Dony (OpenERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2012-11-22 08:29+0000\n"
|
||||
"Last-Translator: Quentin THEURET <Unknown>\n"
|
||||
"Language-Team: French <fr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-11-15 05:09+0000\n"
|
||||
"X-Generator: Launchpad (build 16265)\n"
|
||||
"X-Launchpad-Export-Date: 2012-11-23 05:13+0000\n"
|
||||
"X-Generator: Launchpad (build 16293)\n"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_kanban/static/src/js/kanban.js:10
|
||||
|
@ -35,7 +35,7 @@ msgstr "Voulez-vous réellement supprimer cet enregistrement?"
|
|||
#. openerp-web
|
||||
#: addons/web_kanban/static/src/js/kanban.js:839
|
||||
msgid "Create: "
|
||||
msgstr ""
|
||||
msgstr "Créer : "
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_kanban/static/src/xml/web_kanban.xml:41
|
||||
|
@ -50,17 +50,17 @@ msgstr "restant)"
|
|||
#. openerp-web
|
||||
#: addons/web_kanban/static/src/xml/web_kanban.xml:71
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
msgstr "Ajouter"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_kanban/static/src/xml/web_kanban.xml:71
|
||||
msgid "or"
|
||||
msgstr ""
|
||||
msgstr "ou"
|
||||
|
||||
#. openerp-web
|
||||
#: addons/web_kanban/static/src/xml/web_kanban.xml:72
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
msgstr "Annuler"
|
||||
|
||||
#~ msgid "Create"
|
||||
#~ msgstr "Créer"
|
||||
|
|
Loading…
Reference in New Issue