Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
237 Visninger

Hello everybody!!

Please who can give me an answer.

Why when i do this:

services.create(cr,uid,value) (where services = self.pool.get('project.service.line') )

It add the recordset but without displaying it in the @api v8 of odoo

Avatar
Kassér
Bedste svar

The create method of the old API will only return the id of the record. To view the full record you may use:

new_id = services.create(cr, uid, value) # where services = self.pool.get('project.service.line')
record = services.browse(cr, uid, new_id)

Avatar
Kassér
Forfatter

Thanks a lot for the answer. but, it doesnt work :/

Forfatter

new_id = services.create(cr, uid, value) print new_id record = services.browse(cr, uid, new_id) print record return record I got: 57 callim.project.service.line(57,) But it doesnt display anything. please need an answer

Hi Abdelwahed. This is exactly as expected. If you print record you will get project.service.line(57, ). If you need to print a field, you can do print record.field_name.

Related Posts Besvarelser Visninger Aktivitet
2
aug. 25
2716
1
jul. 25
1088
1
aug. 25
1151
0
maj 25
1515
2
apr. 25
3684