Bricklayers, carpenters and other workmen who have been employed in the construction of a building or other works made for the company, have no action against the person for whom the works were made, except to the extent of what he is indebted to the contractor for, at the time when their action is brought.