でタイムゾーン、および新しい日時フィールドに入れた結果、2時間を得る必要以上CONCATENATE日付と時刻フィールドの後odoo 9
例:
date = fields.Date(string = 'date', select=True)
time = fields.Many2one('period.time', string='Available time',select=True)
date_time = fields.Datetime(string='Datetime', compute="_compute")
description = fields.Char(string = 'Descroption', compute="_compute")
@api.onchange('date', 'time') #time is 08:00:00
def _compute(self):
self.date_time = "%s %s:00" % (self.date,self.time.name)
self.description = "%s %s:00" % (self.date,self.time.name)
DATE_TIME(日時)2017年4月10日10 :00:00 - >間違っ
説明(シャア)2017年4月10日午前8時00分○○秒 - >正しい
どのようにこの問題を解決しますか?
odooにはどのタイプのフィールドがありますか? –
@ EmiproTechnologiesPvt.Ltd。時間はMany2one –
フィールドの完全なコードを書くことができますか? –