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

I tried to set a default status value to "Draft" when creating a new record, but the status is always blank. If I set the status manually, it worked. Here is the my command. Am I missing something?

class custom_purchase(models.Model):
_name = 'custom.purchase'

name = fields.Char(string="Name")
tanggal = fields.Date(string="Tanggal")
status = fields.Selection([('draft','Draft'),('approve','Approve'),('done','Done')], default='draft')
アバター
破棄
最善の回答

Try upgrade restart server and update module, perhaps the default has not been updated yet

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

Restarted Odoo service, ran Update App List, ran Apply Upgrade, upgraded the module, and it worked! Thanks!

アバター
破棄
関連投稿 返信 ビュー 活動
4
10月 25
3082
2
9月 25
1944
4
9月 25
7105
0
8月 25
943
4
5月 25
3863