[MERGE] from 6.1

bzr revid: fva@openerp.com-20120224095803-cg15tsp2jvs4fkj9
This commit is contained in:
Frédéric van der Essen 2012-02-24 10:58:03 +01:00
commit 80f9259b1f
9 changed files with 27 additions and 26 deletions

View File

@ -1,5 +1,5 @@
name = 'openerp-web'
version = '6.1rc1'
version = '6.1.1'
description = "Web Client of OpenERP, the Enterprise Management Software"
long_description = "OpenERP Web is the web client of the OpenERP, a free enterprise management software"
author = "OpenERP SA"

View File

@ -762,11 +762,13 @@ class Menu(openerpweb.Controller):
Menus = s.model('ir.ui.menu')
# If a menu action is defined use its domain to get the root menu items
user_menu_id = s.model('res.users').read([s._uid], ['menu_id'], context)[0]['menu_id']
menu_domain = [('parent_id', '=', False)]
if user_menu_id:
menu_domain = s.model('ir.actions.act_window').read([user_menu_id[0]], ['domain'], context)[0]['domain']
menu_domain = ast.literal_eval(menu_domain)
else:
menu_domain = [('parent_id', '=', False)]
domain_string = s.model('ir.actions.act_window').read([user_menu_id[0]], ['domain'], context)[0]['domain']
if domain_string:
menu_domain = ast.literal_eval(domain_string)
return Menus.search(menu_domain, 0, False, False, context)
def do_load(self, req):

View File

@ -449,7 +449,7 @@ openerp.web.Database = openerp.web.OldWidget.extend(/** @lends openerp.web.Datab
submitHandler: function (form) {
var $form = $(form),
fields = $form.serializeArray(),
$db_list = $form.find('select[name=drop_db]'),
$db_list = $form.find('[name=drop_db]'),
db = $db_list.val();
if (!confirm("Do you really want to delete the database: " + db + " ?")) {

View File

@ -540,19 +540,17 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
* @param {Array} records selected record values
*/
do_select: function (ids, records) {
this.$element.find('.oe-list-delete')
.attr('disabled', !ids.length);
if (this.sidebar) {
if (ids.length) {
this.sidebar.do_unfold();
} else {
this.sidebar.do_fold();
}
}
if (!records.length) {
this.$element.find('.oe-list-delete').attr('disabled', !ids.length);
if (!ids.length) {
this.dataset.index = 0;
if (this.sidebar) { this.sidebar.do_fold(); }
this.compute_aggregates();
return;
}
this.dataset.index = _(this.dataset.ids).indexOf(ids[0]);
if (this.sidebar) { this.sidebar.do_unfold(); }
this.compute_aggregates(_(records).map(function (record) {
return {count: 1, values: record};
}));

View File

@ -154,7 +154,7 @@
<option t-att-value="db"><t t-esc="db"/></option>
</t>
</select>
<input t-if="!db_list" name="drop_db" class="required"
<input t-if="!db_list" name="backup_db" class="required"
type="text" autofocus="autofocus"/>
</td>
</tr>

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-02-22 06:57+0000\n"
"X-Generator: Launchpad (build 14838)\n"
"X-Launchpad-Export-Date: 2012-02-23 05:24+0000\n"
"X-Generator: Launchpad (build 14855)\n"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:11

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-02-22 06:57+0000\n"
"X-Generator: Launchpad (build 14838)\n"
"X-Launchpad-Export-Date: 2012-02-23 05:24+0000\n"
"X-Generator: Launchpad (build 14855)\n"
#. openerp-web
#: addons/web_graph/static/src/js/graph.js:19

View File

@ -276,14 +276,15 @@ openerp.web_kanban.KanbanGroup = openerp.web.OldWidget.extend({
if (this.group) {
this.value = group.value;
this.title = group.value;
if (this.value instanceof Array) {
this.title = this.value[1];
this.value = this.value[0];
}
var field = this.view.fields_view.fields[this.view.group_by];
if (field) {
try {
this.title = openerp.web.format_value(this.value, field, false);
this.title = openerp.web.format_value(group.value, field, false);
} catch(e) {}
} else if (this.value instanceof Array) {
this.title = this.value[1];
this.value = this.value[0];
}
_.each(this.view.aggregates, function(value, key) {
self.aggregates[value] = group.aggregates[key];

View File

@ -51,7 +51,7 @@ copyright = u'2011, OpenERP S.A.'
# The short X.Y version.
version = '6.1'
# The full version, including alpha/beta/rc tags.
release = '6.1.0pre'
release = '6.1.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.