콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
1417 화면

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
2960
2
9월 25
1899
4
9월 25
7021
0
8월 25
911
4
5월 25
3763