accessing fields using objects in reports

Asked by KAKA1.2

I want access fields in the table by using object.I have got error when accessing the fields

example
acc_objs=self.pool.get('account.account').browse(self.cr, self.uid, ids2)
for aobj in acc_objs:
      code = aobj.code when i accessing code i got "code = browse(account.account,12)" like that and not return exact value

what can i do for access all fields from database?
want to create any dictionary?

Can u help me?

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Naresh(OpenERP) (nch-openerp) said :
#1

hello,
you must be having your code too as many2one . if so then you need to access it as aobj.code.xxx here xxx is field name .

Can you help with this problem?

Provide an answer of your own, or ask KAKA1.2 for more information if necessary.

To post a message you must log in.