I am trying to create report from wizard
'form_data': self.read()[0]
What is [0] refer to in this code?
self.read() ==>read the current record?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I am trying to create report from wizard
'form_data': self.read()[0]
What is [0] refer to in this code?
self.read() ==>read the current record?
Hi Asmaa,
When you access self.read()[0], you are retrieving the first record in the list of records returned by self.read(). The index 0 indicates the position of the first record in the list.
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrar-seRelated Posts | Respostes | Vistes | Activitat | |
---|---|---|---|---|
|
2
d’ag. 25
|
2318 | ||
|
1
de jul. 25
|
835 | ||
|
1
d’ag. 25
|
1150 | ||
|
0
de maig 25
|
1289 | ||
|
2
d’abr. 25
|
3496 |
This is the full code:
and I'm asking why we putting [0] here?