I have a python method:
class ReceiptModel(models.Model):
_name = 'receipt.model'
amount = fields.Integer('Amount')
def get_receipt_amount(self):
for record in self:
amount = record.amount + 100
return amount
OWL JS class:
/** @odoo-module **/
const { Component, useState, onWillStart, onWillUnmount } = owl;
export class ReceiptAmount extends Component {
setup() {
this.receiptAmount = useState ({ value: "" }); super.setup();
}
_getWalletAmount() {
//get value from the python method 'get_wallet_amount()'
}
}
In the '_getWalletAmount()' method I want to execute the 'get_wallet_amount()' and get the result. How to do this?
Thanks