Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5547 มุมมอง

Hello All, I want when the user set a value to the filed the system save it and when he create a new record the system suggest this value. any suggestion ? Thank you

อวตาร
ละทิ้ง

Why do you want to do it with javascript? You can do it on openerp with defaults and a function that throws the last value inserted and that's all.

ผู้เขียน

Please let me the function name. what i can put here _defaults = { 'my_field' : ???, }

คำตอบที่ดีที่สุด

I have the same problem. In the ineger fields the default value is 0. If you try to set this to some other value, using the _defaults like so: _defaults = { 'account_id': None,  }. You can set it to any value except for Null value. I guess this gets overriden with the javascript controll seting a value 0 if there is no value given by the server. Any ideas on this. Thank you.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ค. 25
224
1
ก.ค. 25
4981
0
ก.ค. 25
524
0
มิ.ย. 25
628
1
มิ.ย. 25
808