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

Hi,

    I have a boolean field and a button. I want this boolean field to be true only if the button pressed and mail sends.

my boolean field, mail_send = fields.Boolean('mail send)  

아바타
취소
베스트 답변

Hi Shaffaf,

You simply make a button in the XML with a function defined in it like this:

<button name="your_button" string="Send e-mail" type="object" class="btn-primary"/>

Then define a Python function where you set the boolean to true:

@api.multi
def your_button(self):
    self.your_boolean_field = True

Regards,
Yenthe

아바타
취소
작성자

Thanks Yenthe

베스트 답변

How would the syntax be if my checkbox is in the model of sale.order and my button in account.move?

아바타
취소
관련 게시물 답글 화면 활동
2
8월 25
2495
3
2월 25
3797
0
5월 24
46
1
4월 24
3512
4
9월 23
5053