Is there a way I can override the value of an existing function? I wanted to override the value of the variable, transactions.
def _query_avatax_taxes(self, commit):if not self:
return {}
if not self.company_id.sudo().avalara_api_id or not self.company_id.sudo().avalara_api_key:
raise RedirectWarning(
_('Please add your AvaTax credentials'),
self.env.ref('base_setup.action_general_configuration').id,
_("Go to the configuration panel"),
)
client = self._get_client(self.company_id)
transactions = {record: record._get_avatax_taxes(commit) for record in self}
return {
record: client.create_transaction(transaction, include='Lines')
for record, transaction in transactions.items()
}