A partial performance of an indivisible obligation extinguishes a corresponding proportion thereof, if the benefit of such performance is voluntarily retained by the creditor, but not otherwise. If such partial performance is of such a nature that the creditor cannot avoid retaining it without injuring his own property, his retention thereof is not presumed to be voluntary.
Ca. Civ. Code § 1477