Hello,
I am trying to get the partner total balance. But it is not working properly. If partner have receivable and payable balance both then it is working fine. If receivable or payable balance is zero (0.00) it does not computes the total balance. Following is the code which i am using. can you please check and guide where i am doing wrong.
@api.onchange('debit','credit')
def __total_balance(self):
if self.debit and self.credit:
self.balance = self.debit - self.credit