Merge pull request #2317 from odoo-dev/master-fix-theme-chm
[FIX] website.theme: need to convert xmlids; input are always checked
This commit is contained in:
@@ -403,10 +403,11 @@ class Website(openerp.addons.web.controllers.main.Home):
|
||||
"""
|
||||
cr, uid, context, pool = request.cr, request.uid, request.context, request.registry
|
||||
view = pool["ir.ui.view"]
|
||||
context = dict(request.context or {}, active_test=True)
|
||||
|
||||
def set_active(ids, active):
|
||||
if ids:
|
||||
view.write(cr, uid, ids, {'active': active}, context=dict(request.context or {}, active_test=True))
|
||||
view.write(cr, uid, self.get_view_ids(ids), {'active': active}, context=context)
|
||||
|
||||
set_active(disable, False)
|
||||
set_active(enable, True)
|
||||
|
||||
@@ -73,7 +73,8 @@
|
||||
return openerp.jsonRpc('/website/theme_customize_get', 'call', {
|
||||
'xml_ids': this.get_xml_ids(this.$inputs)
|
||||
}).done(function (data) {
|
||||
self.$inputs.filter('[data-xmlid]').each(function () {
|
||||
self.$inputs.filter('[data-xmlid=""]').prop("checked", true).change();
|
||||
self.$inputs.filter('[data-xmlid]:not([data-xmlid=""])').each(function () {
|
||||
if (!_.difference(self.get_xml_ids($(this)), data[1]).length) {
|
||||
$(this).prop("checked", false).change();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user