[V6] audittrail falls in error when name column is declared readonly=True at object class declaration

Bug #919353 reported by Aristóbulo Meneses
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Low
OpenERP Publisher's Warranty Team

Bug Description

If you declare an object like this

class MyObject(osv.osv):
    _name = 'my.object'

    _columns = {
        'name' : fields.char('Name', size=256, readonly=True),
    }

Myobject()

Then at audittrail.py:327:
    ...
    "name": resource['name'],

will fall in error as resource doesn't contain a key called 'name', because that field was declared readonly=True at class declaration.

I have bypassed this error by changing that line with:

   'name' : resource.get('name'),

description: updated
Changed in openobject-addons:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
Revision history for this message
Marco Dieckhoff (dieck) wrote :

As I see, someone already requested this from OPW for 6.0

Can you please state when this fix will be available?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.