<t t-foreach="values" t-as="value">
<input type="hidden" t-att-value="value.editor1" id="aaa"/>
<script type="text/javascript">
var a= document.getElementById("aaa").value;
alert(a);
document.getElementById("kkkr").innerHTML = a;
</script>
<span id="kkkr"> </span>
here iam getting only first record every time
How to get all records present in the table
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
4
Replies
4452
Tampilan
In your example foreach has every time the same input tag with id = "aaa". Many input lines (not array), but only one id. In this case Method getElementById("aaa")
returns each time the value of the first line. Change it to ... for example: 'aaa' + value.id
or organise as array.
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
2
Jun 24
|
1390 | ||
|
1
Des 23
|
1171 | ||
|
1
Apr 23
|
1330 | ||
Integrating paymongo payment acquirer in odoo 10.
Diselesaikan
|
|
1
Mar 23
|
2152 | |
|
0
Des 22
|
1778 |
log your values, whether its a dict or record
Yes these are dict values
I am getting only first record of table
Every time pf fpr loop my javascript getting only first recod insted of pointing to next id