コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
3059 ビュー

i created a form and now i want to add date on top of the page which should show todays date? How to do that?

アバター
破棄
最善の回答

HI,

You can use computed fields: because its is computed on-the-fly.

Define a Date field with compute. Please try this script:


    date = fields.Date(compute='_compute_date', string='Date')

    def _compute_date(self):

        for record in self:

            end = datetime.date.today()

            record.date = end


Hope this helps.


アバター
破棄
著作者 最善の回答

I want to add on top(header part) not below part..so kindly help me with how to add above part..in ACTION Part...??

アバター
破棄