diff --git a/addons/audittrail/audittrail.py b/addons/audittrail/audittrail.py index 71008e0855b..965086461fb 100644 --- a/addons/audittrail/audittrail.py +++ b/addons/audittrail/audittrail.py @@ -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): diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 3480ab47221..3161a8950c8 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -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):