← Back to team overview

openerp-india team mailing list archive

[Bug 1111597] [NEW] Audittrail generates KeyError on some models

 

Public bug reported:

Steps to reproduce:
1. Install crm module and add some crm.lead objects.
2. Install Audittrail module and add rule to track crm.lead changes.
3. Try to change some fields of crm.lead object.
4. You will not be able to save the changes because of Audittrail's KeyError.

You can avoid this error by changing the way you access dictionary elements in prepare_audittrail_log_line function from
old_values[key]['value']['field_name']
to
old_values[key]['value'].get(field_name)

** Affects: openobject-addons
     Importance: Undecided
         Status: New

** Branch linked: lp:~chtd/+junk/openobject-addons-6.1-audittrail-
keyerror

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

Title:
  Audittrail generates KeyError on some models

Status in OpenERP Addons (modules):
  New

Bug description:
  Steps to reproduce:
  1. Install crm module and add some crm.lead objects.
  2. Install Audittrail module and add rule to track crm.lead changes.
  3. Try to change some fields of crm.lead object.
  4. You will not be able to save the changes because of Audittrail's KeyError.

  You can avoid this error by changing the way you access dictionary elements in prepare_audittrail_log_line function from
  old_values[key]['value']['field_name']
  to
  old_values[key]['value'].get(field_name)

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


Follow ups

References