# Copyright (c) 2018, SolutionERP LLC and contributors
# For license information, please see license.txt


from xhiveframework.contacts.address_and_contact import (
	delete_contact_and_address,
	load_address_and_contact,
)
from xhiveframework.model.document import Document


class Bank(Document):
	def onload(self):
		"""Load address and contacts in `__onload`"""
		load_address_and_contact(self)

	def on_trash(self):
		delete_contact_and_address("Bank", self.name)
