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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
1866
Views
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