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