[MERGE] forward port branch 8.0 up to 716ceede16
This commit is contained in:
@@ -956,17 +956,17 @@ class account_voucher(osv.osv):
|
|||||||
if line.reconcile_id:
|
if line.reconcile_id:
|
||||||
move_lines = [move_line.id for move_line in line.reconcile_id.line_id]
|
move_lines = [move_line.id for move_line in line.reconcile_id.line_id]
|
||||||
move_lines.remove(line.id)
|
move_lines.remove(line.id)
|
||||||
reconcile_pool.unlink(cr, uid, [line.reconcile_id.id])
|
reconcile_pool.unlink(cr, uid, [line.reconcile_id.id], context=context)
|
||||||
if len(move_lines) >= 2:
|
if len(move_lines) >= 2:
|
||||||
move_line_pool.reconcile_partial(cr, uid, move_lines, 'auto',context=context)
|
move_line_pool.reconcile_partial(cr, uid, move_lines, 'auto',context=context)
|
||||||
if voucher.move_id:
|
if voucher.move_id:
|
||||||
move_pool.button_cancel(cr, uid, [voucher.move_id.id])
|
move_pool.button_cancel(cr, uid, [voucher.move_id.id], context=context)
|
||||||
move_pool.unlink(cr, uid, [voucher.move_id.id])
|
move_pool.unlink(cr, uid, [voucher.move_id.id], context=context)
|
||||||
res = {
|
res = {
|
||||||
'state':'cancel',
|
'state':'cancel',
|
||||||
'move_id':False,
|
'move_id':False,
|
||||||
}
|
}
|
||||||
self.write(cr, uid, ids, res)
|
self.write(cr, uid, ids, res, context=context)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def unlink(self, cr, uid, ids, context=None):
|
def unlink(self, cr, uid, ids, context=None):
|
||||||
|
|||||||
@@ -554,9 +554,12 @@ class MergePartnerAutomatic(osv.TransientModel):
|
|||||||
'min_id': min_id,
|
'min_id': min_id,
|
||||||
'aggr_ids': aggr_ids,
|
'aggr_ids': aggr_ids,
|
||||||
}
|
}
|
||||||
|
# To ensure that the used partners are accessible by the user
|
||||||
proxy.create(cr, uid, values, context=context)
|
partner_ids = self.pool['res.partner'].search(cr, uid, [('id', 'in', aggr_ids)], context=context)
|
||||||
counter += 1
|
if len(partner_ids) >= 2:
|
||||||
|
values['aggr_ids'] = partner_ids
|
||||||
|
proxy.create(cr, uid, values, context=context)
|
||||||
|
counter += 1
|
||||||
|
|
||||||
values = {
|
values = {
|
||||||
'state': 'selection',
|
'state': 'selection',
|
||||||
|
|||||||
@@ -120,12 +120,15 @@ var QWeb2 = {
|
|||||||
}
|
}
|
||||||
return r.join('');
|
return r.join('');
|
||||||
} else {
|
} else {
|
||||||
|
// avoid XMLSerializer with text node for IE
|
||||||
|
if (node.nodeType == 3) {
|
||||||
|
return node.data;
|
||||||
|
}
|
||||||
if (typeof XMLSerializer !== 'undefined') {
|
if (typeof XMLSerializer !== 'undefined') {
|
||||||
return (new XMLSerializer()).serializeToString(node);
|
return (new XMLSerializer()).serializeToString(node);
|
||||||
} else {
|
} else {
|
||||||
switch(node.nodeType) {
|
switch(node.nodeType) {
|
||||||
case 1: return node.outerHTML;
|
case 1: return node.outerHTML;
|
||||||
case 3: return node.data;
|
|
||||||
case 4: return '<![CDATA[' + node.data + ']]>';
|
case 4: return '<![CDATA[' + node.data + ']]>';
|
||||||
case 8: return '<!-- ' + node.data + '-->';
|
case 8: return '<!-- ' + node.data + '-->';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user