audittrail cannot log some records

Bug #592990 reported by Albert Cervera i Areny - http://www.NaN-tic.com
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

Models that do not use _rec_name but name_get() cannot be logged using audittrail and it raises a crash. The attached patch, fixes the problem.

Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote :
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hi Albert,

I would like to know for which object could it crash?
Models should either have a name field or _rec_name member.

Exemplify the situation please.
Thanks.

Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote : Re: [Bug 592990] Re: audittrail cannot log some records

A Dilluns, 14 de juny de 2010, Jay (Open ERP) va escriure:
> Hi Albert,
>
> I would like to know for which object could it crash?
> Models should either have a name field or _rec_name member.

I don't agree. You may want to override name_get() to return some data which
is not a field in the database. See account.invoice, for example. It's true
that account.invoice has a 'name' field but I think it's more a coincidence
than a design decision. Why would we want name_get() otherwise?

> Exemplify the situation please.
> Thanks.

--
Albert Cervera i Areny
http://www.NaN-tic.com
OpenERP Partner
Mòbil: +34 669 40 40 18

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hi Albert,

I agree that name_get() should be overridden to display some specific data(other than a field in DB).
We have examples of Project,Product,etc.

I just wanted to know where could it crash.

Thanks.

Revision history for this message
Samantha (samantha-z-mathews) wrote :

Jay(openerp),
why do you hv a problem with patch?

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Samantha,

Don't get this either way. I didn't say I have any problem with patch.
I would like to have a situation illustrated here,so we can proceed accordingly.

Hope this makes it clear.

Thanks.

Changed in openobject-addons:
status: New → Triaged
Changed in openobject-addons:
status: Triaged → Incomplete
Revision history for this message
Jamin Shah(OpenERP) (jamin-openerp) wrote :

Hello Albert,

This issue is not reproduced at our end,So i am closing the bug.
You can re-open this with details.

Thanks.

Changed in openobject-addons:
status: Incomplete → Invalid
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.