Retailers in southern California have avoided strike action at their stores after union officials and supermarket chiefs negotiated an agreement over contracts.