← Back to team overview

credativ team mailing list archive

[Bug 903160] Re: audit_trail module does not records logs the 0ne2many fields

 

I was setting an audit create/write/delete  on "sale order" and "sale order line" 
and got this on save of a new SOL

 File "/home/srv/openerp/instances/trunk/openobject-server/openerp/service/netrpc_server.py", line 62, in run
    result = netsvc.dispatch_rpc(msg[0], msg[1], msg[2:])
  File "/home/srv/openerp/instances/trunk/openobject-server/openerp/netsvc.py", line 325, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/srv/openerp/instances/trunk/openobject-server/openerp/service/web_services.py", line 580, in dispatch
    res = fn(db, uid, *params)
  File "/home/srv/openerp/instances/trunk/openobject-server/openerp/osv/osv.py", line 120, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/srv/openerp/instances/trunk/openobject-server/openerp/osv/osv.py", line 172, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/srv/openerp/instances/trunk/openobject-addons/audittrail/audittrail.py", line 494, in execute_cr
    return self.log_fct(cr, uid, model, method, fct_src, *args)
  File "/srv/openerp/instances/trunk/openobject-addons/audittrail/audittrail.py", line 300, in log_fct
    self.process_data(cr, uid_orig, pool, res_ids, model, method, old_values, new_values, field_list)
  File "/srv/openerp/instances/trunk/openobject-addons/audittrail/audittrail.py", line 441, in process_data
    lines = self.prepare_audittrail_log_line(cr, uid, pool, model, res_id, method, old_values, new_values, field_list)
  File "/srv/openerp/instances/trunk/openobject-addons/audittrail/audittrail.py", line 408, in prepare_audittrail_log_line
    if key not in old_values or key not in new_values or old_values[key]['value'][field_name] != new_values[key]['value'][field_name]:
KeyError: 'id'

-- 
You received this bug notification because you are a member of OpenERP
Framework Experts, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/903160

Title:
  audit_trail module does not records logs the 0ne2many fields

Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  I have installed audit_trail module and made audit rule for
  purchase.order and purchase.order.line object for create,write and
  unlink method. Also I have subscribed both rules.

  Now, i have made a purchase order with 2 lines of products in it.

  Now again I have open that purchase order (obviously now that purchase
  order is in write mode) and made a change in one of purchase order
  line's requested "Quantity" and "UOM" fields.

  After that I have seen the audit logs for both objects. I was not able
  to see the log of changed values of "Quantity" and "UOM" in
  purchase.order.line object.

  Is this bug in openerp?

  Thanks in Advance.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/903160/+subscriptions


References