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

The default behavior in Odoo 9 date fields type is assign the current date by giving click. Is it possible to change this behavior so that for example by giving click on the field not charge any default date ?.


Note: I'm not using the new API, I'm using version 7 compatible.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

it's better for you to use the new api, I think odoo will remove the v7 api for odoo10.

with v7 it's like this:

_columns = { 'start_work': fields.datetime(string="Start Work", default='2016-07-16 02:33:25') } 
อวตาร
ละทิ้ง
ผู้เขียน

Thanks for answering; I was referring to the date that default is placed when clicking on the field in version 9.

https://dl.dropboxusercontent.com/u/49982149/OpenERP/event_onclick_date_field.gif.gif

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

In odoo 9 you just apply for this code,

start_work = fields.Datetime(string="Start work",default='2016-07-16 02:33:25')   

อวตาร
ละทิ้ง

Mr.Kiruba he asked in old API version i.e 7

Related Posts ตอบกลับ มุมมอง กิจกรรม
Only month and year in a date แก้ไขแล้ว
4
ธ.ค. 23
24253
0
มี.ค. 15
6710
0
ก.ย. 16
2553
Year only needed - how to implement? แก้ไขแล้ว
2
มี.ค. 15
5277
2
มี.ค. 22
3506