@classmethod
def get_manifest(cls, carrier, warehouse):
    """
        Returns currently opened manifest for carrier account. if not open new.
        """
    manifests = cls.search([('state', '=', 'open'), ('carrier', '=',
        carrier), ('warehouse', '=', warehouse)])
    if manifests:
        return manifests[0]
    return cls.create([{'carrier': carrier, 'warehouse': warehouse}])[0]
