Skip to Content
Menu
This question has been flagged

Can anyone point me in the general direction to trigger a function when I select a specific payment journal? I can't seem to get it working since a popup appears when you try to select a payment journal. I guess it's the same way you call any field from a popup but I'm stumped.

Avatar
Discard
Best Answer

Hi Mark,

I think you can achieve this by giving a onchage function for  that field, inside the onchange function you can check whether the journal is the exact one or not. If yes you can continue.

Thank you


@api.onchange('journal_id')
def check_journal(self):
if self.journal_id and self.journal_id.id == 1:
# here you can write the function body
# make necessary change in if condition, its just a sample
Avatar
Discard
Related Posts Replies Views Activity
0
Mar 16
2436
1
Sep 23
11327
0
Aug 23
814
2
Jun 23
1141
3
May 23
2741