[MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 10056 revid:dle@openerp.com-20140519133339-uxb01aik1z8wu1sy
This commit is contained in:
commit
44dca825e0
|
@ -432,6 +432,14 @@ def prepare_audittrail_log_line(cr, uid, pool, model, resource_id, method, old_v
|
|||
'old_value_text': key in old_values and old_values[key]['text'].get(field_name)
|
||||
}
|
||||
lines[key].append(data)
|
||||
# On read log add current values for fields.
|
||||
if method == 'read':
|
||||
data={
|
||||
'name': field_name,
|
||||
'old_value': key in old_values and old_values[key]['value'].get(field_name),
|
||||
'old_value_text': key in old_values and old_values[key]['text'].get(field_name)
|
||||
}
|
||||
lines[key].append(data)
|
||||
return lines
|
||||
|
||||
def process_data(cr, uid, pool, res_ids, model, method, old_values=None, new_values=None, field_list=None):
|
||||
|
|
|
@ -565,7 +565,7 @@ class pos_order(osv.osv):
|
|||
try:
|
||||
self.signal_paid(cr, uid, [order_id])
|
||||
except Exception as e:
|
||||
_logger.error('Could not mark POS Order as Paid: %s', tools.ustr(e))
|
||||
_logger.error('Could not fully process the POS Order: %s', tools.ustr(e))
|
||||
|
||||
if to_invoice:
|
||||
self.action_invoice(cr, uid, [order_id], context)
|
||||
|
@ -725,8 +725,6 @@ class pos_order(osv.osv):
|
|||
move_obj = self.pool.get('stock.move')
|
||||
|
||||
for order in self.browse(cr, uid, ids, context=context):
|
||||
if not order.state=='draft':
|
||||
continue
|
||||
addr = order.partner_id and partner_obj.address_get(cr, uid, [order.partner_id.id], ['delivery']) or {}
|
||||
picking_id = picking_obj.create(cr, uid, {
|
||||
'origin': order.name,
|
||||
|
@ -1167,8 +1165,8 @@ class pos_order(osv.osv):
|
|||
return self.write(cr, uid, ids, {'state': 'payment'}, context=context)
|
||||
|
||||
def action_paid(self, cr, uid, ids, context=None):
|
||||
self.create_picking(cr, uid, ids, context=context)
|
||||
self.write(cr, uid, ids, {'state': 'paid'}, context=context)
|
||||
self.create_picking(cr, uid, ids, context=context)
|
||||
return True
|
||||
|
||||
def action_cancel(self, cr, uid, ids, context=None):
|
||||
|
|
Loading…
Reference in New Issue